KartoffelToby / better_thermostat

This custom component for Home Assistant will add crucial features to your climate-controlling TRV (Thermostatic Radiator Valves) to save you the work of creating automations to make it smart. It combines a room-temperature sensor, window/door sensors, weather forecasts, or an ambient temperature probe to decide when it should call for heat and automatically calibrate your TRVs to fix the imprecise measurements taken in the radiator's vicinity.
https://better-thermostat.org
GNU Affero General Public License v3.0
763 stars 122 forks source link

Don't turn off BTRV after the lowest setpoint temperatur is reached (ex. window was opened) #1393

Open TBSniller opened 2 weeks ago

TBSniller commented 2 weeks ago

Motivation:

After an open window was closed, the BTRVs HVACMode often changes to the OFF state, which lead to cold rooms

Changes:

I'm not sure for what these lines are for. When the window is opened, the real TRV is automatically set to the lowest temp. Then, through these lines, the BTRV is turned off.
Don't know why the BTRV is controlled here? Maybe to reflect such changes to the UI, or is there a specific reason?

If it was for the UI feedback, then these lines make a bit sense, as the BTRV would be set back to HEAT, if _new_heating_setpoint goes back to a higher temperature. But then the issue here is, that this statement is never reached again, as its blocked by this if statement https://github.com/KartoffelToby/better_thermostat/blob/6a349d9c54772395a06d3dc79c41a566106f9f71/custom_components/better_thermostat/events/trv.py#L160

So if there wasn't a real need for this kind of behavior, my changes should be enough.
Otherwise I think the logic must be fixed, so statement is reached again that turnes the BTRVs HVACMode back to HEAT. But in my opinion, it could still lead to more problems, if BTRV controls it's own HVACMode.

Related issue (check one):

Checklist (check one):

Test-Hardware list (for code changes)

Debian 11 VM 4GB and devcontainers according to CONTRIBUTION.md

HA Version: 2024.9.1 Zigbee2MQTT Version: 1.40.1-1 TRV Hardware: TS0601 (BRT-100-TRV)

New device mappings