mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 02:46:38 +00:00
Introduced a new device class "plug" for the binary sensor. (#558)
* Introduced a new device class "plug" for the binary sensor. See https://github.com/home-assistant/home-assistant-polymer/issues/550 * removed plug as domain
This commit is contained in:
parent
9b0f4fa234
commit
ba5f401890
@ -5,7 +5,7 @@ window.hassAttributeUtil.DOMAIN_DEVICE_CLASS = {
|
||||
binary_sensor: [
|
||||
'connectivity', 'light', 'moisture', 'motion', 'occupancy', 'opening',
|
||||
'sound', 'vibration', 'gas', 'power', 'safety', 'smoke', 'cold', 'heat',
|
||||
'moving'],
|
||||
'moving', 'plug'],
|
||||
cover: ['garage'],
|
||||
};
|
||||
|
||||
|
@ -385,6 +385,8 @@ window.hassUtil.binarySensorIcon = function (state) {
|
||||
case 'safety':
|
||||
case 'smoke':
|
||||
return activated ? 'mdi:verified' : 'mdi:alert';
|
||||
case 'plug':
|
||||
return activated ? 'mdi:power-plug-off' : 'mdi:power-plug';
|
||||
default:
|
||||
return activated ? 'mdi:radiobox-blank' : 'mdi:checkbox-marked-circle';
|
||||
}
|
||||
@ -497,6 +499,7 @@ window.hassUtil.computeStateState = function (stateObj) {
|
||||
case 'light':
|
||||
case 'moving':
|
||||
case 'power':
|
||||
case 'plug':
|
||||
default:
|
||||
}
|
||||
} else if (domain === 'input_datetime') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user