Let Home Assistant automations switch Auto standby per screen, and teach the skill (0.2.48)

App 0.2.48 / firmware 0.2.41:
- Both boards expose the switch "Auto standby", the same standby_enabled setting as the checkbox
  in ESP Screens. Off wakes a dimmed screen and keeps it on; on counts the standby time from that
  moment. The change is saved on the screen and reported through esphome.screen_setting, so ESP
  Screens stores it too. No action runs at boot (restore_mode DISABLED).
- The Claude skill gains "Standby and brightness": the switch, Standby after and the three
  brightness numbers, with an example automation that keeps screens awake while someone is home
  and a light is on or a window is open.
- EASY_SETUP and the README describe the entities and the automation.

Tested through Home Assistant's API on both bench boards (CYD: dimmed -> off wakes in 1.1 s, stays
bright past the standby time, on dims again after 61 s); see docs/TEST_RESULTS_0248.md, which also
records a CYD rollback after the first OTA that points to memory headroom, not to this change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-15 18:06:04 +02:00
parent 57c82fdd12
commit dffd6a90c6
13 changed files with 295 additions and 15 deletions
+35
View File
@@ -238,6 +238,41 @@ After this, changes to these settings don't need a new firmware flash.
| Swipe between pages | Native horizontal swipe, firmware 0.2.7+ | Off |
| Guition rotation | 0°, 90°, 180°, 270°, firmware 0.2.9+ | 0° |
Home Assistant shows the same settings on each screen's ESPHome device: the switch
**Auto standby** (firmware 0.2.41+) and the numbers **Standby after**, **Normal brightness**,
**Standby brightness** and **Night brightness**. Changing them there, for example from an
automation, also changes them in ESP Screens and keeps them after a restart. Turning Auto
standby off wakes the screen and keeps it on; turning it on counts the standby time from
that moment. To keep a screen on while someone is home and a light is on:
```yaml
alias: Keep the kitchen screen awake
mode: restart
triggers:
- trigger: state
entity_id: [person.alex, light.living_room]
actions:
- if:
- condition: state
entity_id: person.alex
state: home
- condition: state
entity_id: light.living_room
state: "on"
then:
- action: switch.turn_off
target:
entity_id: switch.kitchen_screen_auto_standby
else:
- action: switch.turn_on
target:
entity_id: switch.kitchen_screen_auto_standby
```
Every change is saved on the screen, so switch on changes that happen a few times a day,
not on every motion. ESP Screens → Settings → Claude installs a skill that writes such
automations for you.
Night hours use the ESPHome device's timezone and the time from HA.
Without a valid time, the screen uses the regular standby brightness; matching
start and end times turn the night window off. At 0%, only the
+14
View File
@@ -176,6 +176,20 @@ 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.48 / firmware 0.2.41
Storage, protocol, preferences and keys are unchanged.
- Both profiles add a template switch `setting_auto_standby` ("Auto standby", entity category config,
`restore_mode: DISABLED`, state from `screen_settings::current.standby_enabled` through its lambda).
Its actions change `standby_enabled`, save the settings preference, send the existing
`esphome.screen_setting` event (`standby_enabled`, 1/0; the app already stores bool settings from it)
and run `apply_screen_settings`, which wakes a dimmed screen when standby is off. Turning it on sets
`last_touch_ms`, so the standby time counts from then.
- `claude_skill.text()` gains "Standby and brightness" (the switch, the four numbers, an example
automation); `core.AUTO_STANDBY_MIN_FIRMWARE` is 0.2.41. The skill description stays under 200 bytes.
An installed skill shows as outdated until it is installed again.
### Compatibility 0.2.47 / firmware 0.2.40
Firmware and board profiles; the app only raises `FIRMWARE_VERSION`. Storage, protocol, preferences and
+43
View File
@@ -0,0 +1,43 @@
# Test results app 0.2.48 / firmware 0.2.41 (2026-09-15)
The Auto standby switch for Home Assistant automations and the standby section of the Claude skill.
See CHANGELOG 0.2.48 and RELEASING "Compatibility 0.2.48".
## Automated
- Python (`.venv-portal`): 170 tests OK; `tests/test_claude_skill.py` checks the new section (the
switch, the four numbers, the minimum firmware, the intro link) and parses the new example
automation (five YAML blocks), including that it triggers on every entity its condition reads.
- C++ (`clang++ -std=c++17 -Wall -Wextra -Werror -I . -I components/smart_display`): 13/13 PASS.
- `generate_packages.py --check` green, `generate_icons.py --check` verified.
- ESPHome 2026.6.2 compile SUCCESS, one after another: `easy-cyd-device.yaml` (RAM 32.0%, flash
78.6%), `easy-guition-device.yaml` (RAM 33.0%, flash 19.0%), `guition-device.yaml` (RAM 33.1%, flash 20.0%)
and `device.yaml` (RAM 32.1%, flash 83.3%). Packages carry `SCREEN_FIRMWARE_VERSION` 0.2.41.
## Bench boards (OTA) and Home Assistant
Both boards run 0.2.41. The switch was driven only through Home Assistant's REST API, the way an
automation does it, and watched through the backlight light entity and the app's inventory.
- CYD (standby after 60 s): the screen had dimmed to 55 %. `switch.turn_off` switched the entity off and
brought the backlight to 100 % within 1.1 s; the app's stored settings showed `standby_enabled: false`.
After 80 s without a touch the screen was still at 100 %. `switch.turn_on` switched it on and the screen
dimmed again after 61 s. The stored setting returned to `true`.
- Guition: `switch.turn_off` switched the entity off within 1.2 s and the screen stayed bright for 30 s;
`switch.turn_on` switched it back on; the stored setting returned to `true`.
## Observed on the CYD, not caused by this release
- The first OTA of 0.2.41 crashed within its first minute and the bootloader rolled back to 0.2.40 by
itself ("OTA rollback detected"). A second OTA of the same build booted, was marked successful and
passed the test above without a restart.
- Around the crash the CYD logged LVGL failing to allocate 13.8 KB layer buffers and a task watchdog
reset with a backtrace in the API connection code. The CYD also restarted twice on 0.2.40 while a
diagnostic script opened API connections every few seconds. Heap after the boot sync is about 70 KB.
This points to the CYD's memory headroom under bursts (boot sync, several API clients, object
opacity layers), not to the switch; a separate check of the CYD's LVGL layer use is due.
## Not tested / for the owner
- An automation of the owner's own that switches Auto standby over a day.
- Installing the updated skill from Settings → Claude and letting Claude write the automation.