mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Add 'lock' device class (#800)
* Add 'lock' device class * Invert lock settings as per https://github.com/home-assistant/home-assistant/pull/11640
This commit is contained in:
parent
bb6c46180d
commit
7377db312b
@ -114,6 +114,10 @@
|
||||
"off": "[%key:state::binary_sensor::battery::off%]",
|
||||
"on": "Hot"
|
||||
},
|
||||
"lock": {
|
||||
"off": "[%key:state::lock::locked%]",
|
||||
"on": "[%key:state::lock::unlocked%]"
|
||||
},
|
||||
"moisture": {
|
||||
"off": "Dry",
|
||||
"on": "Wet"
|
||||
|
@ -11,6 +11,7 @@ window.hassAttributeUtil.DOMAIN_DEVICE_CLASS = {
|
||||
'gas',
|
||||
'heat',
|
||||
'light',
|
||||
'lock',
|
||||
'moisture',
|
||||
'motion',
|
||||
'moving',
|
||||
|
@ -242,6 +242,8 @@ window.hassUtil.binarySensorIcon = function (state) {
|
||||
return activated ? 'mdi:thermometer' : 'mdi:fire';
|
||||
case 'light':
|
||||
return activated ? 'mdi:brightness-5' : 'mdi:brightness-7';
|
||||
case 'lock':
|
||||
return activated ? 'mdi:lock' : 'mdi:lock-open';
|
||||
case 'moisture':
|
||||
return activated ? 'mdi:water-off' : 'mdi:water';
|
||||
case 'motion':
|
||||
|
Loading…
x
Reference in New Issue
Block a user