Grey out what Home Assistant calls off and colour the rest like Home Assistant, so an airco that is off no longer looks on (0.2.85)
The airco tile stayed orange while the airco was off. The firmware kept its own short list of what turns grey and gave an off climate Home Assistant's orange, but Home Assistant has no colour for a climate that is off: its cards fall back to the inactive grey. Other tiles had the same fault: an off fan, a closed blind, a docked robot, a player in standby, an idle script, a paused timer and a camera that isn't streaming all kept their colour. Tile::active() is now a port of the frontend's stateActive() for the domains a tile can show, and every tile that is not active is grey. An airco that is off reads Off, with the room's temperature when the device reports one, as Home Assistant's tile does. tile_controls::accent() follows stateColorCss(): alarm binary sensors red, a battery green, orange or red by its charge, a running script or timer and a streaming camera amber, the weather per condition, the sun amber and indigo, someone in a zone blue. Scenes, selects, numbers and sensors keep their own colour per kind. A full-page tile lights up only for tiles that can be off (Tile::lights_up), and a closed blind's slider keeps its colour. The top bar's alarm classes are Home Assistant's eleven. Checked with tools/check.sh (471 Python tests, 19/19 C++ with 58 state cases and every colour rule) and compiled for both boards: CYD 1,677,488 B (91.4 %, +576 B), Guition 2,054,640 B (25.3 %). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
## 0.2.85 (firmware 0.2.71)
|
||||
|
||||
Off looks off on every tile, in Home Assistant's colours.
|
||||
|
||||
- **What Home Assistant calls off is grey.** Tiles now follow the rule Home Assistant's own cards colour by (its `stateActive()`). An airco or fan that is off, a closed blind, a docked or paused robot, a player that is off or in standby, a script that isn't running, a paused timer and a camera that isn't streaming turn grey, as an off light or door sensor already did. The airco was the one you noticed: its tile stayed orange while the airco was off.
|
||||
- **An airco that is off says Off.** Its tile showed the temperature it was set to, even while off. It now reads *Off*, with the room's temperature when the device reports one (*Off · 21.5°*), as Home Assistant's tile does. While it runs, the tile still shows the set temperature.
|
||||
- **Home Assistant's colours for the rest.** An alarm that goes off is red on its tile, as in the top bar: smoke, gas, carbon monoxide, a leak, heat, a problem, safety, sound, tampering, a low battery and an unlocked lock. A battery sensor is green from 70 %, orange from 30 % and red below that. A running script or timer and a streaming camera are amber. The weather takes the colour of its condition: clouds light grey, fog grey, rain blue, pouring rain indigo, snow pale blue, lightning yellow and wind green. The sun is amber by day and indigo at night, and someone in a zone other than home is blue. Scenes, selects, numbers and sensors keep their own colour per kind, where Home Assistant draws them all in one neutral blue.
|
||||
- **A full-page tile lights up only when it is on.** It now also lights up for an open blind, a speaker that is on, a robot at work or on its way back, a running script, a streaming camera and someone at home or in a zone. Sensors, numbers, selects, scenes, the weather and the sun stay plain, because Home Assistant calls them active all the time; the sun no longer lights up by day.
|
||||
- **The top bar knows the same alarms.** A heat, sound or lock sensor and a low battery now turn red in the top bar too. That part is the add-on's and needs no firmware.
|
||||
- A closed blind's small slider keeps its colour while its tile is grey, as in Home Assistant.
|
||||
- Needs firmware 0.2.71: press **Update** on the screen. Includes everything from 0.2.84. CYD firmware: 1,677,488 bytes, 91.4 % of the update slot (576 bytes more than 0.2.84).
|
||||
|
||||
## 0.2.84 (firmware 0.2.70)
|
||||
|
||||
One shared screen for every board: the two board profiles became one core plus a small file per board.
|
||||
|
||||
@@ -37,7 +37,7 @@ WEEKDAYS = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']
|
||||
REPO = 'https://github.com/MaxGramser/homeassistant_espscreen'
|
||||
REFS = {'cyd': 'main', 'guition': 'main'}
|
||||
# Firmware shipped with this app release; screens below it get an update offer.
|
||||
FIRMWARE_VERSION = '0.2.70'
|
||||
FIRMWARE_VERSION = '0.2.71'
|
||||
# The Auto standby switch a screen offers Home Assistant automations.
|
||||
AUTO_STANDBY_MIN_FIRMWARE = '0.2.41'
|
||||
# The settings page the screen opens itself, and the screen.settings tile that opens it.
|
||||
|
||||
@@ -87,7 +87,10 @@ DOMAIN_ICONS = {
|
||||
MOMENT_DOMAINS = frozenset(['scene', 'button', 'input_button', 'event'])
|
||||
INACTIVE = frozenset(['off', 'closed', 'not_home', 'idle', 'docked', 'standby', 'locked', 'disarmed', 'paused', 'below_horizon'])
|
||||
AMBER, GREEN, RED, BLUE, ORANGE, TEAL = 'FFB300', '43A047', 'E53935', '2196F3', 'FF6F22', '009688'
|
||||
ALARM_CLASSES = frozenset(['problem', 'safety', 'smoke', 'gas', 'carbon_monoxide', 'moisture', 'tamper'])
|
||||
# Binary sensor classes Home Assistant draws red while on (--state-binary_sensor-<class>-on-color); the screen's
|
||||
# tile_controls::alarm_class has the same list (app 0.2.85).
|
||||
ALARM_CLASSES = frozenset(['battery', 'carbon_monoxide', 'gas', 'heat', 'lock', 'moisture', 'problem', 'safety', 'smoke',
|
||||
'sound', 'tamper'])
|
||||
|
||||
def clean_text(text):
|
||||
"""Text the screen can draw: known glyphs, accents folded to the base letter, at most TEXT_BYTES."""
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: ESP Screen Manager
|
||||
version: "0.2.84"
|
||||
version: "0.2.85"
|
||||
slug: esp_screen_manager
|
||||
description: Choose tiles for your CYD and Guition touchscreen, without reflashing.
|
||||
url: https://github.com/MaxGramser/homeassistant_espscreen
|
||||
|
||||
Reference in New Issue
Block a user