-
-
Notifications
You must be signed in to change notification settings - Fork 36.7k
Handle missing value in all platforms of zwave_js #46081
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
Handle missing value in all platforms of zwave_js #46081
Conversation
|
Hey there @home-assistant/z-wave, mind taking a look at this pull request as its been labeled with an integration ( |
AlCalzone
left a comment
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.
Based on my limited understanding
MartinHjelmare
left a comment
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.
Looks good!
|
should it be tagged for next patch release or is is strictly not a bug? |
|
I think we can tag it. |
Breaking change
Proposed change
We get a lot of issue reports of confused users because their entities are shown as unavailable, due to the fact that we render an entity as unavailable when the ZWaveValue.value is missing.
I've had a little discussion about this with @AlCalzone and he said we should never assume that the value is there upfront, it may be added later when the device reports its status or is (partially) reinterviewed. It might even come only once the user has done an action, such as toggling a switch/light. Hence this proposal to not render the entity unavailable but instead allow the user to use the entity. The incorrect state due to the missing value will correct itself over time, maybe even if the user toggles the device from within HA.
I'm still a bit doubting if we should leave the unavailable state for sensors as their state is kind of pointless without data.
Type of change
Example entry for
configuration.yaml:Additional information
Fixes several issues mentioned on discord. I'll collect any issues created on the GH issue tracker.
Fixes zwave-js/zwave-js#1609
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: