Add icon translations to PECO (#112169)

This commit is contained in:
Joost Lekkerkerker 2024-03-05 09:19:37 +01:00 committed by GitHub
parent 2397501776
commit b0136ee244
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 5 deletions

View file

@ -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",
),
)