Choose vacuum, vac & mop or mop on the vacuum card, and a climate card for the CYD (0.2.46)

App 0.2.46 / firmware 0.2.39:
- The vacuum's state message carries extras from its own device: the cleaning mode and water
  selects (found by translation key, then entity id ending, so localized ids work), the suction
  speeds to offer, the battery sensor (HA 2026.8 dropped battery_level), charging and the current
  room. Speeds and water levels a mode covers move into the mode row; Custom only while in use.
  The manager watches these entities and resends only the vacuum's message when one changes.
- Vacuum card redesign on both boards: robot with state, battery, charging bolt and room; Start
  (Pause, Resume) and Dock; then segmented rows for mode, suction and water, showing only the rows
  the chosen mode uses. Taps show at once and wait for Home Assistant; Locate is a round button in
  the Guition hero.
- CYD climate card without the arc: big setpoint between large -/+ keys (debounced, hold to
  repeat) and one row of mode keys in HA's order and colours, with a more key for fan and swing.
- Both profiles clear climate_edit_pending when the climate card is closed, instead of running
  ui_refresh every second while the flag stayed set.

Tested with the owner's Roborock S8 on HA 2026.9.1 (live data, OTA-flashed bench boards) and with
host renders of both boards; see docs/TEST_RESULTS_0246.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-15 15:22:28 +02:00
parent 4ff0d44312
commit aa2137f3f8
23 changed files with 1675 additions and 655 deletions
+35
View File
@@ -176,6 +176,41 @@ 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.46 / firmware 0.2.39
Storage version, tile protocol (`v: 1`), preferences and keys are unchanged. Additive wire fields only.
- A vacuum's state message carries new extras in `x` (`core.vacuum_extras`): `mode` and `water`
(`e` select entity, `s` state, `o` options, `l` labels, `r` one role letter per mode: v/m/b/a),
`fan` (the suction speeds to offer, `o`/`l`), `bat` (0..100), `chg` (1 while charging) and
`room`. Options are capped at six, labels at 24 bytes. With a mode select, speeds and water
levels that a mode covers (`off`, `custom`, `smart_mode`, …) leave the rows, and `custom` leaves
the mode row unless it is the current mode. `a.fan_speed_list` stays capped at four, so firmware
before 0.2.39 draws its old suction row; firmware 0.2.39 with an older app does the same.
- `core.vacuum_related` finds the selects, the battery sensor (`device_class: battery`), the
charging binary sensor (`battery_charging`) and the room sensor on the vacuum's device, by
translation key first (entity ids follow the HA language) and entity id ending second; disabled
entities are skipped. `Manager.device_entries` indexes the registry per device (rebuilt with the
registry object), `related_entities` adds these ids to `watched_entities` and to the `sync_one`
reuse check, so a select change resends the vacuum's message.
- Firmware: `Tile::choices` (`Choice`: kind m/w/s, entity, current, roles, values, labels, `sent`),
`room`, `charging`; the state revision now includes `x`, so a select change confirms a pending
command. Chips send `select.select_option` (or `vacuum.set_fan_speed`), mark the vacuum tile
pending and redraw the card through `lv_async_call` after the event. `tile_controls::vacuum_rows`
/ `vacuum_role` / `shown_value` / `settle_suction` / `choice_action` are covered by
tests/test_tile_controls.cpp. Detail commands: 10-15 suction, 50-55 mode, 60-65 water;
`detail_actions` holds 32 buttons. `tick()` redraws an open vacuum card when its state text changes.
- CYD climate card (home-like-2432s028.yaml): the arc is gone. New widgets `climate_setpoint_card`,
`climate_mode_keys`, `cmkey_*`, font `setpoint_digits` (Roboto 400, 40 px, digits . - °), globals
`active_climate_current`, `active_climate_action`, `active_climate_target_known`, scripts
`climate_card_refresh` and `climate_target_send` (restart mode, 700 ms, entity and value as
parameters); `climate_target_preview`/`climate_target_commit` are removed. `tile_controls::mode_color`
holds HA's mode colours (also used by `domain_accent`). Glyph `dots-horizontal` (F01D8) joins
`tile_icons.FIXED`.
- Both profiles: the 1 s interval clears `climate_edit_pending` when the climate card is closed and,
on runtime tiles, replays the held-back state through `detail_update`, instead of running
`ui_refresh` every second while the flag stayed set.
### Compatibility 0.2.45 (firmware stays 0.2.38)
App only: storage version, tile protocol, preferences and keys are unchanged.
+64
View File
@@ -0,0 +1,64 @@
# Test results app 0.2.46 / firmware 0.2.39 (2026-09-15)
Cleaning mode, suction and water on the vacuum card, the vacuum card redesign on both boards, the
new CYD climate card and the cleared climate edit flag. See CHANGELOG 0.2.46 and RELEASING
"Compatibility 0.2.46".
## Automated
- Python (`.venv-portal`): 170 tests OK.
- New: `tests/test_vacuum_card.py` covers the extras on the owner's Roborock data (Dutch entity
ids), a robot without a mode select, a plain vacuum, entity id endings, disabled entities and
unknown modes (an Ecovacs-style `work_mode`), bounded options, and that a select change marks
the vacuum dirty and resends only its message.
- C++ (`clang++ -std=c++17 -Wall -Wextra -Werror -I . -I components/smart_display`): 13/13 PASS;
`test_tile_controls.cpp` adds `mode_color`, `vacuum_rows`, `vacuum_role`, `shown_value`,
`settle_suction` and `choice_action`.
- `generate_packages.py --check` green, `generate_icons.py --check` verified (150 pickable icons,
179 glyphs).
- ESPHome 2026.6.2 compile SUCCESS, one after another: `easy-cyd-device.yaml` (RAM 31.9%, flash
78.5%), `easy-guition-device.yaml` (RAM 32.8%, flash 18.8%), `guition-device.yaml` (RAM 32.9%,
flash 19.8%), `device.yaml` (RAM 32.0%, flash 83.2%). Packages carry `SCREEN_FIRMWARE_VERSION` 0.2.39.
## Home Assistant facts (owner's HA 2026.9.1, read only)
- Roborock S8 (`roborock.vacuum.a51`): `vacuum.s8` has no `battery_level`; its device holds
`select.woonkamer_s8_schoonmaakmodus` (translation key `cleaning_mode`: vacuum, vac_and_mop,
mop, custom), `select.s8_intensiteit_van_dweilen` (`mop_intensity`: off, mild, standard, intense,
custom), `sensor.s8_batterij` (battery), `binary_sensor.s8_opladen` (battery_charging) and
`sensor.s8_huidige_kamer` (`current_room`). Entity ids follow the UI language, so matching goes
by translation key.
- The Roborock cleaning mode select exists in HA 2026.8.0 and 2026.9.1 (`RoborockCleaningModeSelectEntity`).
- `core.extras` on this data: mode vacuum / vac_and_mop / mop (roles `vbm`), water mild / standard /
intense, suction quiet … max_plus, battery, charging and room; the message is 612 bytes.
## Bench boards (OTA)
- Both Easy Setup builds uploaded over the network; `device_info` reports project 0.2.39, compiled
2026-09-15 15:11:48 (CYD) and 15:12:20 (Guition), matching the build logs.
- The real `vacuum.s8` state with the new extras, built by the app code from live HA data, was sent
through `screen_message` and the card opened with `preview_runtime_card` on both boards. The
Guition capture (`capture_ui.py`) shows Docked, 83 % with the charging bolt, Start cleaning and
Dock, Vac & mop, Max and Intense. The owner looked at both screens.
- The owner tapped Vacuum on the CYD: Home Assistant switched `select.woonkamer_s8_schoonmaakmodus`
to `vacuum` (15:16:12) and the robot set its water to off and suction to balanced. The production
app was still 0.2.45 and resent the vacuum without the new extras, so the card fell back to
suction only, as described for mixed versions in the CHANGELOG.
## Renders (ESPHome host + SDL, both boards, this release's code)
- Vacuum card with the owner's data in ten states: docked and charging, cleaning with the room,
mop only, vacuum only, Custom (note instead of rows), returning, error, paused at 12 % (red
battery), a vacuum without selects (small hero on the CYD) and an Ecovacs-style robot with long
labels (Vac, then mop; Ultra high). No label is cut off; the mode row keeps its place.
- CYD climate card: heating with humidity, an air conditioner with five modes plus ···, and off
(grey setpoint). The README images `guition-vacuum.png`, `cyd-vacuum.png` and `cyd-climate.png`
come from these renders.
## Not tested / for the owner
- The vacuum rows with app 0.2.46 on the Yellow after the store update (live updates of mode,
water, battery and room while the robot cleans).
- The CYD climate card by hand with the real air conditioner (− / + taps, holding, mode keys, ···).
- Other brands only through the tests with their documented entity names; no Dreame or Ecovacs
robot was available.
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 36 KiB