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.
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?
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):
[x] fixes #1234 and properly #1270
[ ] there is no related issue ticket
Checklist (check one):
[ ] I did not change any code (e.g. documentation changes)
[x] The code change is tested and works locally.
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
[x] I avoided any changes to other device mappings
Motivation:
After an open window was closed, the BTRVs HVACMode often changes to the OFF state, which lead to cold rooms
Changes:
_new_heating_setpoint
is the real TRVs lowest temperature: https://github.com/KartoffelToby/better_thermostat/blob/6a349d9c54772395a06d3dc79c41a566106f9f71/custom_components/better_thermostat/events/trv.py#L204-L209I'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#L160So 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
climate.py