-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tolerance does not work #1314
Comments
Tested 1.5.0 and 1.5.1 with the currently latest core HA version 2024.4.4 and the tolerance value of any of my better thermostat entities is not considered. Downgrading to better thermostat 1.4.0 mitigates the issue for me. Tested with different better thermostat entities and tolerance values (0.5, 1, 2, 5). Would be great to get this fixed, since my heating keeps turning on and off on minor temperature drops in my basement where I set the tolerance value to 2 to avoid this. Let me know if I can further support the debugging process, e.g. providing information such as logs or testing anything. |
Same Problem here, but downgrading to BT 1.4.0 does not help. |
So from what I gathered, what happens is the following (running 1.6.0):
-> it seems that the tolerance value is not correctly applied upon re-configuring the entity, even though the entity itself thinks it is. Additionally, please consider setting a sane default value for tolerance, a value of 0 is really not useful. Something like 0.3 could be a good balance. |
Actually, scratch the fix part. Still happening even after re-creating with correct values. Downgrading does not help. Tolerance is sadly broken. |
@Soukyuu can you prove its still broken with 1.6.1? |
@KartoffelToby sadly yes. Temp just dropped from 21 (setpoint) to 20.9 and BT changed to "heat", TRV opened (and now it closed again). Tolerance on a freshly created instance is set to 0.3 |
I wasn't taking part in the this thread before, but I can confirm as well, tolerance doesn't work for me with v.1.6.1. Regardless of the setup, it turns on/off with 0.1 changes. |
Some trv has internal alg. That can lead to issues. So make sure you enable the overheat protection in BT config. Anyway there are some possible Bugs and i currently running testings. |
Thanks a lot, @KartoffelToby! I tried overheat protection and the behavior is the same. |
upgraded to z2m 1.41 - without changes |
1.7.0 Beta 1 should address the problem, but remember that with small tolerances it is difficult to determine whether external influences are simply driving the temperature up. So if 20 is set with a tolerance of 0.1, for example, the temperature should never fall below 19.8. But if the room continues to heat up, it can also go over 20.1. The crucial thing is that the thermostat is no longer actively heating. And this bug should actually be fixed with 1.7.0. |
With 1.7.0b1 it seems that the tolerance is working, but the BT-climate does not show 'idle' in hvac-action. Example: This kind of breaks my automations, because i use the hvac_action: heating to turn my boiler on. but now, the "real" TRVs in each room might be closed, because the heating_action in BT stays heating. |
I find the same behavior in 1.6.1, but my automation are based on the real thermostats' hvac action, however in my displayed cards, the better thermostats show as heating, but valves are closed. |
I've looked a bit into the BT files, and I found out that the tolerance was missing from the HVAC action of BT, so modifying the file climate.py in your custom components > BT folder, lines 1122 and 1125 in my case (Version 1.6.1) to add the tolerance will fix the issue (in bold below): |
@ss8n your patch seems to be working for me. Thanks a lot for your contribution! |
@ss8n Nice catch! I was already finding a workaround but this was much easier. This should definitely be part of the production code in the next release. |
Plus, if you'd like the thermostat to reach the set temperature and not idle at: set minus tolerance, I think replacing the last "else:" should in theory do just that (changes in bold), but not sure how the interaction with the real thermostat impacts the opened or closed valve based on tolerance, but will look into that at some point if it isn't fixed by then: """Return the current HVAC action""" |
I noticed that when it went from lower temperature (lower than target - tolerance) it turned to idle when it went into tolerance zone. That new elif seems to deal with it correctly. I'm testing it now and if some tuning will be needed I will try to solve it and post it here. @ss8n Thanks again. This solved my problem so far and saved me a lot of time😊 |
I updated to |
Also commented lines 95, 96 and 97 from calibration.py because I want my real TRVs to mimic the external sensor temperature and not take in account the tolerance, as that is handled by the changes in BT from above. LE: plus lines 188, 189, 190:
|
https://github.com/andyxpert/better_thermostat/releases/tag/Rewrote-hvac A different take on the hvac method However due to personal preference I'm switching to Versatile Thermostat as it doesn't use an underlying thermostat and can control the switch directly. |
WARNING, THIS IS UNTESTED CODE!!!! I think it should be something like this:
This ensures the hvac_action stays on heating if cur_temp is rising. if bt_target_temp is reached the hvac_action goes to idle. if cur_temp+tolerance falls below bt_target_temp the hvac_action goes back to heating. If someone wants to try, please let me know if it works. I am currently not at home and dont want to mess with my system.
With this template you can 'simulate' my attempt above |
This works if current temperature is rising, but after that the hvac_action is none until it gets heating again. |
I just did some testing and came up with this:
This works like a charm! If cur_temp rises, hvac_action stays heating until target_temp=cur_temp and then goes to idle. It stays in idle until target_temp>=cur_temp+tolerance. With this code the hvac_action is always defined an doesnt become none in some cases like the code from @ss8n This is at least how i personally think the tolerance should work |
Is there an intent to merge this to master branch and make a release? With TRVs, it drains unnecessary battery for motor movements, when temperature oscillates around the target |
Prerequisites
Description
The tolerance (0.3 in my case) does not work. The temperature is set to 21.5° and if current temperature drops to 21.4°, the BT switches from idle to heating. I tried different settings for the tolerance, but none of them worked.
The text was updated successfully, but these errors were encountered: