Bugfix for switches that support standby
This commit is contained in:
parent
10b322a4fa
commit
b0b12e20e0
|
@ -28,7 +28,7 @@ export default new Polymer({
|
|||
|
||||
if (newVal && this.stateObj.state === 'off') {
|
||||
this.turn_on();
|
||||
} else if (!newVal && this.stateObj.state === 'on') {
|
||||
} else if (!newVal && this.stateObj.state !== 'off') {
|
||||
this.turn_off();
|
||||
}
|
||||
},
|
||||
|
@ -40,7 +40,7 @@ export default new Polymer({
|
|||
},
|
||||
|
||||
updateToggle(stateObj) {
|
||||
this.toggleChecked = stateObj && stateObj.state === 'on';
|
||||
this.toggleChecked = stateObj && stateObj.state !== 'off';
|
||||
},
|
||||
|
||||
forceStateChange() {
|
||||
|
|
Loading…
Reference in New Issue