mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Add support for garage doors
This commit is contained in:
parent
31fb734c5b
commit
0d59490ebc
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user