-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Implement coordinator class for Tradfri integration #64166
Implement coordinator class for Tradfri integration #64166
Conversation
I have a few notes and questions:
|
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
I've refactored the code to try to accomodate to the changes proposed in this review. I might have misunderstood something so apologies in advance if I haven't made all the requested changes. |
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Groups can be set as disabled by default and users can enable them if they want. We don't need a config option anymore for that. We can use the option to set default enabled state as a migration during a deprecation time. But let's change that in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Let's wait with merging this until after we cut the beta tomorrow so we get some time to test this more in the dev branch before releasing it.
Good idea! Once merged, I'll add (in two separate PR's) sensors for the battery level of the cover platform, and air quality sensors from the fan platform. Thank you for taking me through this PR! 🙇 |
Should I un-draft this or will you do it when the timing is right in regards to the beta? |
We can merge now. |
Thanks! |
Breaking change
Proposed change
This PR introduces a data coordinator class for the native Tradfri integration as discussed here.
The code works in my dev environment for the fan platform:
This PR will follow the following workflow:
coordinator.py
file, refactoring of__init__.py
, refactoring offan.py
and refactoring of thebase_class.py
file. Relevant changes to tests. I would like this to be fully aligned with HA-standards before I proceed with the other platforms.Once that is done, the platforms, will be updated one by one:
To-do:
Type of change
Additional information
Checklist
black --fast 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
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: