frontend
frontend copied to clipboard
ZWave config parameter value not saved in automation when set to zero
The problem
When using the visual automation editor, selecting the first option "illumination turned off completely" for the ZWave config parameter 41 of a Fibaro plug results in the following, viewed in Yaml
device_id: 123123123123123123123 domain: zwave_js type: set_config_parameter parameter: 41 bitmask: null subtype: 41 (LED ring colour (device is ON))
The editor should have generated an additional line stating
value: 0
A workaround is of course to add this line manually using Yaml but it took me quite some time to figure out why I could select any option from the visual editor, except for the first.
I don't know if this issue predates Core 9.2 as I didn't use the ZWave config parameter until recently.
What version of Home Assistant Core has the issue?
2022-9-2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Z-wave JS
Link to integration documentation on our website
https://www.home-assistant.io/integrations/zwave_js/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @home-assistant/z-wave, mind taking a look at this issue as it has been labeled with an integration (zwave_js) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
zwave_js documentation zwave_js source (message by IssueLinks)
I think this is a frontend issue
just to add here, this is a device action that supports action capabilities (e.g. addition of new fields). Those fields don't handle 0 properly
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I believe this bug stems from this line:
https://github.com/home-assistant/frontend/blob/dev/src/components/ha-selector/ha-selector-select.ts#L193
Zwave utilizes a lot of selectors which have a value '0', and this selector class seems to think that values of 0 are falsey and does not propogate state changes when the value is 0.
Removing the || !value clause here makes the radio selector work properly for 0 values, though I'm yet unsure what other implications that might have.