Colour the sliders of playing media players, covers and numbers (0.2.60)

Since firmware 0.2.42 a slider showed the tile's colour only while
Tile::active() held, which is never true for a playing, paused or idle
media player, a cover or a number, so their volume, position and value
sliders stayed grey like a light that is off.

Tile::slider_active() follows Home Assistant's tile sliders instead: grey
for an unavailable entity, a light or fan that is off and a media player
that is off or in standby; a closed cover keeps its colour as in HA's
cover position feature, and a number with a value is active. The sliders
of direct controls on wide tiles and the small sliders use it;
Tile::active() and its other uses are unchanged.

Checked with 282 Python and 15 C++ tests, generate_packages --check, ESP32
builds of both check profiles and host renders of both boards.
Firmware 0.2.52.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-17 08:15:56 +02:00
parent 4f81c7952d
commit 87b2082f81
12 changed files with 115 additions and 10 deletions
+13
View File
@@ -176,6 +176,19 @@ icons sit off-center in the browser); run `generate_packages.py` afterward.
The `MDI_GLYPH_*` substitutions are retired: `TILEn_ICON` in manual
profiles must come from the set. No changed preferences or keys.
### Compatibility 0.2.60 / firmware 0.2.52
`components/smart_display` and both board profiles; the app only raises `FIRMWARE_VERSION`. Storage, tile protocol,
preferences and keys are unchanged.
- `Tile::slider_active()` (runtime_model.h) decides whether a slider shows the tile's colour, after Home Assistant's
`stateActive()` and its tile features: grey for an unavailable entity, a light or fan that is off and a media player
that is `off` or `standby`; a cover keeps its colour when closed (`hui-cover-position-card-feature.ts`) and a number
with a value is active. `style_panel` (sliders of direct controls) and `render_slot` (small sliders, with a third bit
in the palette cache key) use it. `Tile::active()` is unchanged: it still greys the circle of an off switch, person or
timer and gives the value overlay its `was_on`.
- Older firmware keeps the grey sliders; nothing else differs.
### Compatibility 0.2.59 / firmware 0.2.51
App, both board profiles and `components/smart_display`. Storage, tile protocol, preferences and keys are