Add binary sensor icon for DEVICE_CLASS_BATTERY_CHARGING (#6876)

* Add binary sensor icon for DEVICE_CLASS_BATTERY_CHARGING

* Update icons for DEVICE_CLASS_BATTERY_CHARGING
This commit is contained in:
epenet 2020-09-09 13:27:54 +02:00 committed by GitHub
parent 07569f10b5
commit 2dffe7ba9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,8 @@ export const binarySensorIcon = (state: HassEntity) => {
switch (state.attributes.device_class) {
case "battery":
return activated ? "hass:battery" : "hass:battery-outline";
case "battery_charging":
return activated ? "hass:battery" : "hass:battery-charging";
case "cold":
return activated ? "hass:thermometer" : "hass:snowflake";
case "connectivity":