Make sun solar_rising a binary_sensor#140956
Conversation
|
Hey there @Swamp-Ig, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
|
Still valid. |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Thanks! Since we already have a calculation for this state (rising), I think it's ok to add a binary sensor. It should have been a binary sensor from the beginning instead of a sensor.
Some small comments to address.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Updated as requested. CI fail seems unrelated. |
|
Please link a user docs PR that updates the supported sensors: |
Proposed change
A sun sensor for
solar_risinghas been previously added, but it seems like this maybe should have been a binary sensor instead.Its only state values are
"True"or"False". It is just a mirroring of a boolean attribute.It has no hints in automation editor for what values are valid. Testing
"on","true","On",Trueetc will all give the wrong result for state comparison and may be confusing to users.This PR adds a binary_sensor that mimics the existing sensor. I'm not sure what should be done with the existing sensor, if we should announce a plan to deprecate it, or just let both coexist, or yank it out with a breaking change.
Both old and new sensor are disabled by default.
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: