Skip to content

Add own types + add config validation to glances#2150

Merged
zsarnett merged 2 commits intodevfrom
add-own-struct
Nov 30, 2018
Merged

Add own types + add config validation to glances#2150
zsarnett merged 2 commits intodevfrom
add-own-struct

Conversation

@bramkragten
Copy link
Copy Markdown
Member

No description provided.

@ghost ghost assigned bramkragten Nov 29, 2018
@ghost ghost added the in progress label Nov 29, 2018
@@ -24,11 +24,11 @@ import "../../../../components/ha-icon";

const entitiesConfigStruct = struct.union([
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this union? I can imagine it will be a lot easier for us to just convert it to an object before validating it ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if that is easier, would rather validate before processing it. Otherwise, we will still have to manual check to see if entities is present and if it is an array etc...

If we can just add this to the struct, I think it is easier this way. But until the editor supports all the functions we have to create custom ones :-(

@zsarnett zsarnett merged commit 0e6f6dd into dev Nov 30, 2018
@delete-merged-branch delete-merged-branch bot deleted the add-own-struct branch November 30, 2018 18:35
@ghost ghost removed the in progress label Nov 30, 2018
@balloob balloob mentioned this pull request Dec 5, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants