Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate Nodes against home-assistants web-socket #134

Open
asosnovsky opened this issue Aug 7, 2022 · 0 comments
Open

Validate Nodes against home-assistants web-socket #134

asosnovsky opened this issue Aug 7, 2022 · 0 comments
Labels
enhancement Improvement on an existing feature
Milestone

Comments

@asosnovsky
Copy link
Owner

We should be relying on home-assistants web-socket action.

Here are examples ha websocket payload for validation

// request
{"type":"validate_config","trigger":{"platform":"zone","zone":"zone.home","event":"enter","entity_id":["person.dr_who"]},"id":33}
// response
{"id":33,"type":"result","success":true,"result":{"trigger":{"valid":true,"error":null}}}
// request
{"type":"validate_config","condition":{"condition":"time","before":"20:00:00","after":"09:00:00","weekday":["mon","tue","wed","thu","fri"]},"id":41}
// response
{"id":41,"type":"result","success":true,"result":{"condition":{"valid":true,"error":null}}}
// request
{"type":"validate_config","condition":{"condition":"time","before":"20:00:00","after":"09:00:00","weekday":["mon1","tue3","wed","thu","fri"]},"id":43}
// response
{"id":43,"type":"result","success":true,"result":{"condition":{"valid":false,"error":"value must be one of ['fri', 'mon', 'sat', 'sun', 'thu', 'tue', 'wed'] @ data['weekday'][0]"}}}
@asosnovsky asosnovsky added enhancement Improvement on an existing feature good first issue Good for newcomers labels Aug 7, 2022
@asosnovsky asosnovsky added this to the Version 1 milestone Aug 7, 2022
@asosnovsky asosnovsky removed the good first issue Good for newcomers label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement on an existing feature
Projects
Status: In Progress
Development

No branches or pull requests

1 participant