Skip to content

Show and control cooling on the controller card - #2

Open
thorwaler wants to merge 2 commits into
lweberru:mainfrom
thorwaler:main
Open

Show and control cooling on the controller card#2
thorwaler wants to merge 2 commits into
lweberru:mainfrom
thorwaler:main

Conversation

@thorwaler

@thorwaler thorwaler commented Aug 6, 2026

Copy link
Copy Markdown

Companion to the integration cooling PR
(thorwaler/pool_controller_coolingmode). With the integration reporting
hvac_mode: cool / hvac_action: cooling, the card currently mislabels cooling as
Idle, lights the dial heating-red, and shows radiator glyphs. This adds cooling
display and an on-card heat/cool toggle.

⚠️ Please port to source before merging

The repo ships only the built main.js, so these commits edit the bundle directly. They're here as a working reference, not a clean merge. The changes should be
re-applied in the card's source and rebuilt, and the build must regenerate
main.js.gz
(a stale gzip is served in preference to main.js and silently shadows
it. This cost me an hour of "why won't my change show up"). Diffs below describe the
exact behaviour to reproduce.

What changed

Status

  • Add a cooling string to the status tables (en: "Cooling", de: "Kühlbetrieb";
    other languages fall back to en).
  • Status-label logic recognises hvac_action of cooling/cool.

Icons (mirror the heating iconography)

  • Active cooling → blue mdi:snowflake (instead of mdi:radiator).
  • Idle/disabled → mdi:snowflake-off when mode is cool (mirrors the persistent
    mdi:radiator-off heating indicator, so a cooling indicator shows even when off).
  • Unknown-value fallthrough → snowflake in cool mode.

Dial

  • The "on" visual lights for hvac === "cool" as well as "heat".
  • Fill/accent go blue (#2980b9) in cool mode instead of heating-red (#c0392b),
    for both the current-value fill and the target marker.

Heat/Cool toggle button

  • New action button (data-action="heat-cool-toggle") that calls
    climate.set_hvac_mode on the controller's climate entity, flipping cool↔heat —
    mirroring the existing maintenance set_hvac_mode call.
  • Reflects the current mode by colour/icon/label (blue "Cooling" / red "Heating" /
    neutral when off).

Implementation gotcha

There are two action-buttons markup blocks in the bundle — a static one and the
live one built with ${showPowerSavingButton ? …} conditionals. The button must be
added to the conditional/live block or it won't render.

Testing

Pointed at a climate entity in cool mode: off/idle shows greyed snowflake-off; cool
selected lights the dial blue; actively cooling shows the solid blue snowflake and the
status reads Cooling. Heating behaviour unchanged in heat mode.

andreas added 2 commits August 6, 2026 20:28
Recognises hvac_action/hvac_mode of cooling/cool from the integration's
cool_mode:

- add a 'cooling' status string (en: Cooling, de: Kuehlbetrieb; others fall
  back to en)
- status label returns status.cooling for cooling/cool
- status icon shows a blue snowflake (mdi:snowflake) instead of the radiator
- dial 'on' visual lights for hvac === 'cool' as well as 'heat'

NOTE: edited in the built bundle for reference; the change should be made in
the card source and rebuilt.
Adds a 'Heat / Cool' action button (data-action=heat-cool-toggle) that calls
climate.set_hvac_mode on the controller's climate entity, flipping between
heat and cool. Mirrors the existing maintenance set_hvac_mode pattern; the
dial already reflects the resulting mode (blue + snowflake).
@thorwaler

Copy link
Copy Markdown
Author

Companion backend PR: lweberru/pool_controller#5 — adds the cool hvac_mode this card reflects. Merge/port that first, since the card only shows cooling once the integration reports hvac_action: cooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants