mirror of
https://github.com/home-assistant/frontend.git
synced 2025-05-01 00:37:20 +00:00
zwave_js config param should only be a toggle if there are 2 states (#10812)
This commit is contained in:
parent
f3104d3c93
commit
a065740c91
@ -327,6 +327,9 @@ class ZWaveJSNodeConfig extends SubscribeMixin(LitElement) {
|
|||||||
if (!("states" in item.metadata)) {
|
if (!("states" in item.metadata)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (Object.keys(item.metadata.states).length !== 2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!(0 in item.metadata.states) || !(1 in item.metadata.states)) {
|
if (!(0 in item.metadata.states) || !(1 in item.metadata.states)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user