Use runtime_data in VeSync#159720
Conversation
|
Hey there @markperdue, @webdjoe, @TheGardenMonkey, @iprak, @SapuSeven, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
| await manager.update() | ||
| await manager.check_firmware() | ||
|
|
||
| config_entry.runtime_data = VeSyncDataCoordinator(hass, config_entry, manager) |
There was a problem hiding this comment.
is there a reason we are not building the manager inside the coordinator now and to https://github.com/cdnninja/core/blob/5614518710c77b1e190f313e944dcf03c72b5fb9/homeassistant/components/vesync/__init__.py#L60-L65 within _async_setup of the coordinator
There was a problem hiding this comment.
Could move it in. Only thought is that #156663 (comment) comment is referencing adding a second coordinator. Both will need access to the manager. Thoughts?
There was a problem hiding this comment.
Then it probably doesn’t make sense
joostlek
left a comment
There was a problem hiding this comment.
We should also extend the config entry type with the typeslot, so we can type entry.runtime_data
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Typing added and replied to the other comment. |
# Conflicts: # tests/components/vesync/test_init.py
Proposed change
Convert to config_entry.runtime_data for vesync to reach bronze. #156663
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: