Add binary_sensor to Starlink#85409
Conversation
|
Not sure what's going on with mypy, nothing is declared as |
|
Are you missing a |
|
Possibly, we did have issues with typing due to the wide range of supported Python versions. If that's the case, do we just need an empty marker file |
seems so
|
|
Interesting that it didn't flag it locally with that change, but I will roll that back for now. Thanks! |
You probably wouldn't see it until |
208cac7 to
11d725c
Compare
e76895e to
632279d
Compare
|
I have switched to more standard binary_sensor declarations, and updated the documentation PR to reflect changes. |
|
Looks good. 👍 Some minor comments above. I'll try to find a time this week where I can reset again and test |
|
I probably should've given you a heads-up to avoid re-resetting for this 😅 |
Co-authored-by: J. Nick Koston <nick@koston.org>
ea4a439 to
d272fc9
Compare
| StarlinkBinarySensorEntityDescription( | ||
| key="install_pending", | ||
| name="Update pending", | ||
| device_class=BinarySensorDeviceClass.UPDATE, |
There was a problem hiding this comment.
https://developers.home-assistant.io/docs/core/entity/binary-sensor?_highlight=binarys
On means update available, Off means up-to-date. The use of this device class should be avoided, please consider using the update entity instead.
This should be implemented as an update entity instead
There was a problem hiding this comment.
I will look into the update platform next. Buttons (and switches) are relatively small, would it make sense to tack update on the end of the same PR?
There was a problem hiding this comment.
Better to do one platform per PR. Its a lot easier to find small blocks of time to do reviews. Its the big PRs that sit for a long time because they need large chunks of time
There was a problem hiding this comment.
On update platform - how should I handle this situation? Starlink doesn't expose the "latest version" as far as we know, it just says "there is an update"
There was a problem hiding this comment.
We talked about this and it looks like that ends up falling into the exception case since there is no good solution currently when you don't know the new version.
So good to add back in a new PR. Sorry for the churn.
|
Did the reset song and dance to get dishy out of bypass mode. Looks good. I'll take care of dropping the update binary sensor so you don't have to wait for me to retest again |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please address the comment in a new PR. Thanks!
| @@ -12,7 +15,11 @@ | |||
| COORDINATOR_SUCCESS_PATCHER = patch.object( | |||
| StarlinkUpdateCoordinator, | |||
There was a problem hiding this comment.
We should patch the library and not the coordinator. The coordinator is a detail of the integration.
https://developers.home-assistant.io/docs/development_testing#writing-tests-for-integrations


Proposed change
Adding the
binary_sensorplatform to the Starlink integration. This primarily takes data from all "alerts" that the Starlink system exposes, which may change at any given time.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.To help with the load of incoming pull requests: