mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Add device_class_power to sensor (#3057)
This commit is contained in:
parent
3947adbab4
commit
4dfdebb00a
@ -8,6 +8,7 @@ const fixedDeviceClassIcons = {
|
|||||||
illuminance: "hass:brightness-5",
|
illuminance: "hass:brightness-5",
|
||||||
temperature: "hass:thermometer",
|
temperature: "hass:thermometer",
|
||||||
pressure: "hass:gauge",
|
pressure: "hass:gauge",
|
||||||
|
power: "hass:flash",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function sensorIcon(state: HassEntity) {
|
export default function sensorIcon(state: HassEntity) {
|
||||||
|
@ -27,7 +27,14 @@ hassAttributeUtil.DOMAIN_DEVICE_CLASS = {
|
|||||||
"window",
|
"window",
|
||||||
],
|
],
|
||||||
cover: ["garage"],
|
cover: ["garage"],
|
||||||
sensor: ["battery", "humidity", "illuminance", "temperature", "pressure"],
|
sensor: [
|
||||||
|
"battery",
|
||||||
|
"humidity",
|
||||||
|
"illuminance",
|
||||||
|
"temperature",
|
||||||
|
"pressure",
|
||||||
|
"power",
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
hassAttributeUtil.UNKNOWN_TYPE = "json";
|
hassAttributeUtil.UNKNOWN_TYPE = "json";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user