Backend changes for customize config panel.#9134
Conversation
|
@andrey-git, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob and @fabaff to be potential reviewers. |
|
Can you update |
| """Set up the Customize config API.""" | ||
| @asyncio.coroutine | ||
| def hook(hass): | ||
| """Hook to call after updating cutomization file.""" |
There was a problem hiding this comment.
Removed this function
| def async_setup(hass): | ||
| """Set up the Customize config API.""" | ||
| @asyncio.coroutine | ||
| def hook(hass): |
There was a problem hiding this comment.
Can you add the async version and import it from homeassistant.components (it already has the sync version of this method)
| class CustomizeConfigView(EditKeyBasedConfigView): | ||
| """Configure a list of entries.""" | ||
|
|
||
| def _get_value(self, data, config_key): |
There was a problem hiding this comment.
We should update the method signatures for get and write value to include hass, that way you don't have to do declare the class inline.
| hass.states.async_set(config_key, state.state, state_attributes) | ||
|
|
||
| hass.http.register_view(CustomizeConfigView( | ||
| 'customize', 'config', CONFIG_PATH, cv.entity_id, dict, |
There was a problem hiding this comment.
Wonder if we should change the first two parameters to be 'homeassistant', 'customize'
There was a problem hiding this comment.
The first is not really a "domain", so I think the current values are OK.
Description:
Backend changes for customize config panel.
This is a potentially breaking change as someone using the new config UI can overwrite their manual
customize.yamland lose their comments.Example entry for
configuration.yaml(if applicable):Checklist:
Tests are not written yet.
If the code does not interact with devices:
toxrun successfully. Your PR cannot be merged unless tests pass