From b0b12e20e0f61df849c414c2dfbcf9923f784631 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 31 Aug 2015 08:24:01 -0700 Subject: [PATCH] Bugfix for switches that support standby --- src/state-summary/state-card-toggle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state-summary/state-card-toggle.js b/src/state-summary/state-card-toggle.js index 28c76b96a0..992e8868df 100644 --- a/src/state-summary/state-card-toggle.js +++ b/src/state-summary/state-card-toggle.js @@ -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() {