diff --git a/src/components/entity/ha-entity-toggle.js b/src/components/entity/ha-entity-toggle.js index a091d355e7..03a15084c4 100644 --- a/src/components/entity/ha-entity-toggle.js +++ b/src/components/entity/ha-entity-toggle.js @@ -53,7 +53,8 @@ export default new Polymer({ }, _checkToggle(stateObj) { - return stateObj && stateObj.state !== 'off' && stateObj.state !== 'unlocked'; + return stateObj && stateObj.state !== 'off' && + stateObj.state !== 'unlocked' && stateObj.state !== 'closed'; }, // We call updateToggle after a successful call to re-sync the toggle @@ -67,6 +68,9 @@ export default new Polymer({ if (this.stateObj.domain === 'lock') { domain = 'lock'; service = turnOn ? 'lock' : 'unlock'; + } else if (this.stateObj.domain === 'garage_door') { + domain = 'garage_door'; + service = turnOn ? 'open' : 'close'; } else { domain = 'homeassistant'; service = turnOn ? 'turn_on' : 'turn_off'; diff --git a/src/util/domain-icon.js b/src/util/domain-icon.js index 8c18986156..64a85693bc 100644 --- a/src/util/domain-icon.js +++ b/src/util/domain-icon.js @@ -23,6 +23,9 @@ export default function domainIcon(domain, state) { case 'device_tracker': return 'mdi:account'; + case 'garage_door': + return 'mdi:glassdoor'; + case 'group': return 'mdi:google-circles-communities';