Add websocket API for updating core config#24009
Add websocket API for updating core config#24009emontnemery merged 4 commits intohome-assistant:devfrom
Conversation
|
Hey there @home-assistant/core, mind taking a look at this pull request as its been labeled with a integration ( This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people. |
|
Is the WS API documented, and if so should this be added to the docs? |
balloob
left a comment
There was a problem hiding this comment.
Ok to merge when tests updated. I have the UI ready in a branch 😎
|
|
||
| assert msg['id'] == 5 | ||
| assert msg['type'] == TYPE_RESULT | ||
| assert msg['success'] |
There was a problem hiding this comment.
Please verify latitude got set, preferably test all other values too
There was a problem hiding this comment.
Fixed!
I had a review comment which I forgot to publish: should the new WS command config/core/update return:
- The set value(s)
- The updated core config
Or is it fine like it is?
| data.pop('id') | ||
| data.pop('type') | ||
| await hass.config.update(**data) | ||
| connection.send_result(msg['id']) |
There was a problem hiding this comment.
Do we want to return something here?
* Add websocket API for updating core config
Description:
Add new websocket API for updating core config
This is a follow-up to: #23872, #23922
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code does not interact with devices: