mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add icon translations to PECO (#112169)
This commit is contained in:
parent
2397501776
commit
b0136ee244
21
homeassistant/components/peco/icons.json
Normal file
21
homeassistant/components/peco/icons.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"customers_out": {
|
||||
"default": "mdi:power-plug-off"
|
||||
},
|
||||
"percent_customers_out": {
|
||||
"default": "mdi:power-plug-off"
|
||||
},
|
||||
"outage_count": {
|
||||
"default": "mdi:power-plug-off"
|
||||
},
|
||||
"customers_served": {
|
||||
"default": "mdi:power-plug-off"
|
||||
},
|
||||
"map_alert": {
|
||||
"default": "mdi:alert"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -46,7 +46,6 @@ SENSOR_LIST: tuple[PECOSensorEntityDescription, ...] = (
|
||||
translation_key="customers_out",
|
||||
value_fn=lambda data: int(data.outages.customers_out),
|
||||
attribute_fn=lambda data: {},
|
||||
icon="mdi:power-plug-off",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
PECOSensorEntityDescription(
|
||||
@ -55,7 +54,6 @@ SENSOR_LIST: tuple[PECOSensorEntityDescription, ...] = (
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
value_fn=lambda data: int(data.outages.percent_customers_out),
|
||||
attribute_fn=lambda data: {},
|
||||
icon="mdi:power-plug-off",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
PECOSensorEntityDescription(
|
||||
@ -63,7 +61,6 @@ SENSOR_LIST: tuple[PECOSensorEntityDescription, ...] = (
|
||||
translation_key="outage_count",
|
||||
value_fn=lambda data: int(data.outages.outage_count),
|
||||
attribute_fn=lambda data: {},
|
||||
icon="mdi:power-plug-off",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
PECOSensorEntityDescription(
|
||||
@ -71,7 +68,6 @@ SENSOR_LIST: tuple[PECOSensorEntityDescription, ...] = (
|
||||
translation_key="customers_served",
|
||||
value_fn=lambda data: int(data.outages.customers_served),
|
||||
attribute_fn=lambda data: {},
|
||||
icon="mdi:power-plug-off",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
PECOSensorEntityDescription(
|
||||
@ -79,7 +75,6 @@ SENSOR_LIST: tuple[PECOSensorEntityDescription, ...] = (
|
||||
translation_key="map_alert",
|
||||
value_fn=lambda data: str(data.alerts.alert_title),
|
||||
attribute_fn=lambda data: {ATTR_CONTENT: data.alerts.alert_content},
|
||||
icon="mdi:alert",
|
||||
),
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user