Skip to content

Commit

Permalink
Add icon translations to Aseko (home-assistant#108398)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek authored Jan 19, 2024
1 parent 4f998ac commit 5d5a2d1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
1 change: 0 additions & 1 deletion homeassistant/components/aseko_pool_live/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class AsekoBinarySensorEntityDescription(
AsekoBinarySensorEntityDescription(
key="water_flow",
translation_key="water_flow",
icon="mdi:waves-arrow-right",
value_fn=lambda unit: unit.water_flow,
),
AsekoBinarySensorEntityDescription(
Expand Down
17 changes: 17 additions & 0 deletions homeassistant/components/aseko_pool_live/icons.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
2 changes: 0 additions & 2 deletions homeassistant/components/aseko_pool_live/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ def __init__(
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 = {
Expand Down

0 comments on commit 5d5a2d1

Please sign in to comment.