Skip to content

Conversation

Sopsy
Copy link

@Sopsy Sopsy commented Sep 14, 2025

Proposed change

  1. Fixes the missing cooling mode this thermostat has, but is not easily available to be toggled due to ZHA misintepreting "HEATING_ONLY" as something that cannot be toggled to "COOLING_ONLY". Bosch probably means that it does not automatically change to cooling when it's heating only.
    It uses the undocumented 0x06 "centralite specific" value, which works perfectly for this thermostat as well.

  2. Adds Imperial/Metric config option for the temperature reading on the thermostat itself.

  3. Moves Operating mode from Diagnostic to Config, so it is easier to change from the UI. In reality Manual is usually the only mode people would like to use with HA, but this change makes it easier to change to that (default on the thermostat is Schedule).

  4. Changes "Pi Heating Demand" into "Valve duty cycle". This prevents an issue where ZHA thinks a device with a "Pi Heating Demand" entity should always be heating, regardless of the mode. Or at least I think that's what's happening here. The PWM duty cycle is useful information and I would not want to remove it completely. Fixes ZHA Bosch thermostat shows state as heating while cooling home-assistant/core#151763.

  5. Adds an entity for outdoor temperature sensor, useful for automations. This is shown in the top right corner of the screen along with a tree icon indicating "outdoors". The default is indeed -327.68C, but as long as the value is never changed, nothing is displayed on the screen. Valid range is -99.9 - 99.9 C. -100C and below is displayed as Lo, and 100C and higher is not displayed at all, so it can be used as a way to remove the number from the screen.
    To get rid of the temperature in the corner, the thermostat can be rebooted or the value set to anything over 10 000. After a reboot it's gone, but comes back after the first write to the value.

Additional information

2 issues persist that this does not fix. I did not spend too much time trying to figure out how to override the attributes (seemingly not very easy) as they do work, but are just confusing in the UI.

  1. The "Switch" entity in controls is read-only by the thermostat so it should be moved to Sensors and renamed to something like "Relay output" On/Off or "Valve" Open/Closed.
  2. Keypad lockout should be a boolean 0x00/0x01 Off/On, and not an enum. The thermostat does not support the other states.

If someone knows how to do it with just the quirk, I'd be happy to implement.

Device diagnostics

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

Copy link

codecov bot commented Sep 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.13%. Comparing base (2e2bbd9) to head (c4d4741).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4344   +/-   ##
=======================================
  Coverage   92.13%   92.13%           
=======================================
  Files         358      358           
  Lines       11919    11921    +2     
=======================================
+ Hits        10981    10983    +2     
  Misses        938      938           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheJulianJES TheJulianJES added the needs review This PR should be reviewed soon, as it generally looks good. label Sep 14, 2025
@TheJulianJES TheJulianJES self-assigned this Sep 14, 2025
@Sopsy
Copy link
Author

Sopsy commented Sep 18, 2025

Not related to the pull request, but I figured this is the best place to write about my findings.

There are some more values in the thermostat cluster that are not yet figured out. They seem to be read-only, writing to any of them has no effect.

The values are 0x4022, 0x4023, 0x4024, 0x4025, 0x4050, 0x4052, 0x405B, 0x4060, 0x4061, 0x4062 and 0x4063.
0x4022 seems to correlate with the relay position (on/off).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review This PR should be reviewed soon, as it generally looks good.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ZHA Bosch thermostat shows state as heating while cooling
2 participants