Show binary sensors in Home Assistant's words and grey out what is off (0.2.62)

A binary sensor's tile and card now say what Home Assistant says for its
device class, such as Open or Closed for a door and Wet or Dry for a leak
sensor. The screen maps the class it already receives, with the same words
as the top bar and the history card; a test keeps both tables equal. A
history card still waiting for its answer no longer shows the previous
card's word.

Lights and binary sensors that are off turn grey, as in Home Assistant, and
a light without an icon of its own shows a crossed-out bulb while it is off,
on the tile and in the top bar. A chosen icon stays and turns grey.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-17 08:32:22 +02:00
parent 8a587303d7
commit 7311a1cdce
18 changed files with 256 additions and 10 deletions
@@ -190,6 +190,7 @@ inline constexpr Named NAMES[] = {
{"monitor", 0xF0379},
{"information-outline", 0xF02FD},
{"restart", 0xF0709},
{"lightbulb-off", 0xF0E4F},
};
inline constexpr size_t NAME_COUNT = sizeof(NAMES) / sizeof(NAMES[0]);
// Codepoint of a name the fonts carry; 0 for any other name.