-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Add myuplink binary_sensor platform #110388
Add myuplink binary_sensor platform #110388
Conversation
Hey there @pajzo, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@astrandb just a side note, I'm planning adding system notifications as binary sensor also, but will await this PR to be merged. |
Excellent! |
We haven't released any entities under the wrong platform yet, as far as I know, so we won't generate any stale entities if we release this approach with matching platforms in the March release. |
That's correct. It is only super-early adopters that are running the dev branch that will see some garbage. But they can cleanup themselves. |
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.
Please add tests or exclude the new modules from coverage calculation via entries in .coveragerc
.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I prefer to wait with the tests until the structure is sorted out according to your comments. Then it will be a breeze to add them. |
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.
Thanks!
* Add binary_sensor platform * Address review comments * Add one file more to .coveragerc
Breaking change
Proposed change
Some device_points should be added as binary sensors instead of as ordinary sensors.
This PR will analyze the meta-data from API and if a device_point can have exactly two values (0 or 1) a binary sensor will be created.
Side-effect: The new binary sensors will be accompanied by stale sensors with same name after first run of this version. The user can delete these stale sensors manually from the UI but a better solution would be to delete them automatically.
This is no problem for the platforms that are included in HA 2024.3. After that, there can be stale entities when new platforms are merged or the filtering criteria are changed.
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
..coveragerc
.To help with the load of incoming pull requests: