From 5f47fc0477e2f001e71f54eb348641e70edfae34 Mon Sep 17 00:00:00 2001 From: Marc Billow Date: Tue, 28 Jul 2026 18:31:31 +0000 Subject: [PATCH] Add per-state icons for the remaining entities that render with none HA only consults icon-translation state icons when the entity has no static icon of its own (Entity.icon, if set, always wins -- see homeassistant.helpers.entity's state_attributes construction). Audited every entity with a labelled state/state_attributes catalog in translations/en.json against its descriptor's icon= setting: every select (cycles, courses, brightness levels, ...) and most sensors already carry a fixed icon in code, so per-state icons there would be silently shadowed. The three that don't -- air_purifier_fan's preset_mode, machine_state, and connection_mode -- get one per value here. --- custom_components/localthings/icons.json | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/custom_components/localthings/icons.json b/custom_components/localthings/icons.json index a8485eb..13dc586 100644 --- a/custom_components/localthings/icons.json +++ b/custom_components/localthings/icons.json @@ -26,6 +26,36 @@ } } } + }, + "fan": { + "air_purifier_fan": { + "state_attributes": { + "preset_mode": { + "state": { + "smart": "mdi:brain", + "max": "mdi:speedometer", + "mid": "mdi:speedometer-medium", + "windfree": "mdi:weather-windy-variant", + "sleep": "mdi:sleep" + } + } + } + } + }, + "sensor": { + "machine_state": { + "state": { + "idle": "mdi:power-standby", + "active": "mdi:play", + "pause": "mdi:pause" + } + }, + "connection_mode": { + "state": { + "observe": "mdi:broadcast", + "poll": "mdi:sync" + } + } } } }