ADR-0040: In HA mode, the climate card shows the room on screen — its temperature, its humidity, and its climate on the − / + tile¶
Page en anglais
Cette page n'existe qu'en anglais.
Status: Proposed (2026-10-09, asked for by the author; not tried on a tablet when written). Date: 2026-10-09
Context¶
Since ADR-0023 the bottom row shows one room at a time in HA mode, but the climate card above it kept the two fixed temperatures of the 3.x home page (living room on the left, greenhouse on the right) and the − / + tile its own choice (ADR-0033). Swiping to the bedroom left the living-room temperature on screen. The author asked for « the temperature of the room (and its humidity, optional), and a climate per room, in place of the living-room and greenhouse temperatures ».
Constraints: push-only and events-only (ADR-0001, ADR-0025); no new action variable (the API contract stays at 1.0.0, contrat/contrat.yaml); a firmware older than this one must keep working with the new blueprint, and the other way round; no hardcoded colour; every icon in its font's glyphs: (code rule 9).
Decision¶
- Three optional inputs per room in the « Pièce n » sections of the blueprint:
piece_n_temperature(sensor, temperature),piece_n_humidite(sensor, humidity),piece_n_clim(climate); empty by default. Only the temperature turns the feature on for a room. - Keys of
tab5_maj_emplacements, after the reglables, room by room:crpR|min|max|step|unit|capabilities|name(the room climate's settings, the fields ofcrRT, ADR-0027),pR|temperature|humidity|climate(empty field: nothing declared;nan: unknown value; climate1or0),cepR|setpoint|room|mode|preset|fan|swing(its state, the fields ofceRT). Every room is pushed after a (re)connection, empty ones too (pR|||0: the tablet forgets what was removed); then a room when a sensor or its climate changed (slow measures, 5 minutes), or at once when its climate changes state or setpoint (two triggers per room, generated bytools/gen_blueprint_emplacements.py). Older firmware ignores these keys (unknown key). - The climate card follows the room in HA mode (
tab5_piece_climat.cpp, the only writer oficon_salon,val_temp_salon,icon_serre,current_serresince this ADR): on a room with a declared temperature, a thermometer and the room's temperature on the left (the icon tinted by the humidity when there is one), a drop and the humidity on the right, or nothing. In weather mode, or on a room without temperature, the screen of before: sofa, greenhouse (or the arcade pad without a greenhouse), last values received, the styles' colours. - The − / + tile adjusts the room's climate when the room shown has one (
piece_climat_clim()), ahead of the choice made in its list, which is kept and comes back out of HA mode. − / + move the setpoint (clim_piece_pas(), same debounce as a tile climate), a tap on the value opens the climate popup on it. Its commands go to the placecpR(pR+eteindrealready means « Pièce : tout éteindre »); the blueprint sends them to that room's climate only, translated by the same « Clim : … » branches as every other climate. - A long press on the room's temperature opens its history (ADR-0032) with the key
pR, no forecast; the right side (humidity) has no history. The short tap keeps its behaviour: the climate carousel (ADR-0038), opened in HA mode on the room's own climate. - Room climates share the PSRAM table of the tile climates: 5 more cells after the 25 of the tiles.
- Each room climate has its page in the climate carousel (ADR-0038):
clims_enumerer()lists it after the tile climates (ClimRefwitht = -1); one with the same name as a tile climate already listed gets no second page. Opening in HA mode on a room shows its own climate first, else the first of its tiles.
Rejected¶
- A new API action (
tab5_maj_piece_climat): changes the public contract (a major version for the HA files that call it), while an unknown key oftab5_maj_emplacementsis already ignored by older firmware. - Reusing the tile climates (a
clitile of the room as its climate): a room's climate is often not on its tiles (five places), and the wish was « a climate per room », chosen once. pRas the command place: taken by « Pièce : tout éteindre » since ADR-0023.- The climate's own
current_temperatureas the room's temperature: the author asked for a sensor of the room; a climate's sensor is often on the indoor unit, near the ceiling.
Consequences¶
- Update order: either side alone changes nothing. New blueprint with an older firmware: keys ignored, screen of before. New firmware with an older blueprint: no
pRkey, screen of before. Both are needed for the feature. - A room climate's settings (
crpR) only leave with its state changes or a reconnection: a climate that changes its settings without changing its state is seen at the next reconnection, like the tile climates. - The − / + list still opens in HA mode on a room with a climate, but a choice made there (or « next device », ADR-0039) shows only out of HA mode or on another room.
- One more file (
tab5_piece_climat.*); about 5 × 180 bytes more of PSRAM when a room climate is known; two icons (thermometer F050F, drop F058E) already inmdi_font_45.
Update (2026-10-09)¶
ADR-0047: the humidity now has a history, drawn with the temperature in the same popup; a long press on the right side (the room's humidity) opens it too.
Update (2026-10-14): the « Clim » line is the climate « here »; any other choice is kept on every room¶
Reported by husyildiz (discussion #278, firmware 3.9.0-rc.1): on a room with its own climate, the − / + list opened, but choosing the shutter or the tablet's volume changed nothing — the room's climate was forced over the choice on every paint (the consequence written above, « shows only out of HA mode or on another room », which nobody could understand on the screen). Decided by the author on 2026-10-14:
- The « Clim » line of the − / + list is the climate « here » (
clim_ref_ici(),tab5_clim.cpp; the pure rulemodele_ha::clim_ici_rang(), tested on a PC bytools/test_tab5_socle.cpp), amongclims_enumerer(): - only one climate in the home: that one, on every room and in weather mode;
- several: the room shown in HA mode — its own climate first, else its first
clitile without option m —, else the blueprint's; - several, and neither the room nor the blueprint has one: no « Clim » line on that room (the tile shows the chosen device, or the first one).
- Any other device chosen in the list stays chosen on every room, as on the rooms without a climate: the same NVS record (
RGC1), no migration. The stored « climate » choice now means « the climate here ». - The line, the zone, − / +, the tap on the value and the automatic scrolling (ADR-0041) follow it. The blueprint's climate keeps its path (
clim_target, its globals, its popup); a tile or room climate is painted like a device (its name fromclim_tete()), moved byclim_ref_pas()(keytRTorcpR, debouncetab5_debounce_clim_tuile) and its value opens the carousel on it. The tap on the room's temperature (ADR-0048) aims at the same climate (clim_ref_choisir()=clim_ref_ici(), else the first of the list), so the wheel and the tile no longer disagree. piece_climat_clim()is gone; the − / + tile no longer needs the room to have a declared temperature for its climate to show.- Off-device check:
tools/rendu/ecrans.pywalks every room of the demo with no, one and several climates (the − / + zone, then its list) andtools/rendu/planche_reglables.pylays the captures out on one sheet.