1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Bugfix for switches that support standby

This commit is contained in:
Paulus Schoutsen
2015-08-31 08:24:01 -07:00
parent 10b322a4fa
commit b0b12e20e0

View File

@@ -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() {