mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-11 11:26:35 +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: [
|
binary_sensor: [
|
||||||
'connectivity', 'light', 'moisture', 'motion', 'occupancy', 'opening',
|
'connectivity', 'light', 'moisture', 'motion', 'occupancy', 'opening',
|
||||||
'sound', 'vibration', 'gas', 'power', 'safety', 'smoke', 'cold', 'heat',
|
'sound', 'vibration', 'gas', 'power', 'safety', 'smoke', 'cold', 'heat',
|
||||||
'moving'],
|
'moving', 'plug'],
|
||||||
cover: ['garage'],
|
cover: ['garage'],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -385,6 +385,8 @@ window.hassUtil.binarySensorIcon = function (state) {
|
|||||||
case 'safety':
|
case 'safety':
|
||||||
case 'smoke':
|
case 'smoke':
|
||||||
return activated ? 'mdi:verified' : 'mdi:alert';
|
return activated ? 'mdi:verified' : 'mdi:alert';
|
||||||
|
case 'plug':
|
||||||
|
return activated ? 'mdi:power-plug-off' : 'mdi:power-plug';
|
||||||
default:
|
default:
|
||||||
return activated ? 'mdi:radiobox-blank' : 'mdi:checkbox-marked-circle';
|
return activated ? 'mdi:radiobox-blank' : 'mdi:checkbox-marked-circle';
|
||||||
}
|
}
|
||||||
@ -497,6 +499,7 @@ window.hassUtil.computeStateState = function (stateObj) {
|
|||||||
case 'light':
|
case 'light':
|
||||||
case 'moving':
|
case 'moving':
|
||||||
case 'power':
|
case 'power':
|
||||||
|
case 'plug':
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
} else if (domain === 'input_datetime') {
|
} else if (domain === 'input_datetime') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user