Add icon translations to Aseko (#108398)

This commit is contained in:
Joost Lekkerkerker 2024-01-19 20:29:52 +01:00 committed by GitHub
parent 4f998acb78
commit 5d5a2d1381
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 3 deletions

View File

@ -38,7 +38,6 @@ UNIT_BINARY_SENSORS: tuple[AsekoBinarySensorEntityDescription, ...] = (
AsekoBinarySensorEntityDescription(
key="water_flow",
translation_key="water_flow",
icon="mdi:waves-arrow-right",
value_fn=lambda unit: unit.water_flow,
),
AsekoBinarySensorEntityDescription(

View File

@ -0,0 +1,17 @@
{
"entity": {
"binary_sensor": {
"water_flow": {
"default": "mdi:waves-arrow-right"
}
},
"sensor": {
"free_chlorine": {
"default": "mdi:flask"
},
"water_temperature": {
"default": "mdi:coolant-temperature"
}
}
}
}

View File

@ -59,10 +59,8 @@ class VariableSensorEntity(AsekoEntity, SensorEntity):
self._attr_native_unit_of_measurement = self._variable.unit
self._attr_icon = {
"clf": "mdi:flask",
"rx": "mdi:test-tube",
"waterLevel": "mdi:waves",
"waterTemp": "mdi:coolant-temperature",
}.get(self._variable.type)
self._attr_device_class = {