mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +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%]",
|
"off": "[%key:state::binary_sensor::battery::off%]",
|
||||||
"on": "Hot"
|
"on": "Hot"
|
||||||
},
|
},
|
||||||
|
"lock": {
|
||||||
|
"off": "[%key:state::lock::locked%]",
|
||||||
|
"on": "[%key:state::lock::unlocked%]"
|
||||||
|
},
|
||||||
"moisture": {
|
"moisture": {
|
||||||
"off": "Dry",
|
"off": "Dry",
|
||||||
"on": "Wet"
|
"on": "Wet"
|
||||||
|
@ -11,6 +11,7 @@ window.hassAttributeUtil.DOMAIN_DEVICE_CLASS = {
|
|||||||
'gas',
|
'gas',
|
||||||
'heat',
|
'heat',
|
||||||
'light',
|
'light',
|
||||||
|
'lock',
|
||||||
'moisture',
|
'moisture',
|
||||||
'motion',
|
'motion',
|
||||||
'moving',
|
'moving',
|
||||||
|
@ -242,6 +242,8 @@ window.hassUtil.binarySensorIcon = function (state) {
|
|||||||
return activated ? 'mdi:thermometer' : 'mdi:fire';
|
return activated ? 'mdi:thermometer' : 'mdi:fire';
|
||||||
case 'light':
|
case 'light':
|
||||||
return activated ? 'mdi:brightness-5' : 'mdi:brightness-7';
|
return activated ? 'mdi:brightness-5' : 'mdi:brightness-7';
|
||||||
|
case 'lock':
|
||||||
|
return activated ? 'mdi:lock' : 'mdi:lock-open';
|
||||||
case 'moisture':
|
case 'moisture':
|
||||||
return activated ? 'mdi:water-off' : 'mdi:water';
|
return activated ? 'mdi:water-off' : 'mdi:water';
|
||||||
case 'motion':
|
case 'motion':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user