Closed mag2352 closed 3 weeks ago
Hello, I will have a look more closely. I'm not sure of your asumption.
Sounds good. There is no rush on this, as I have this on my branch and it seems to work fine. If this causes issues, I can just use my fork for now. I just find it strange to use the offset setting in the configuration, and then have the VTherm stop using the offset once the target temperature is reached. In my case, this causes my HVAC to turn back on when the offset is no longer being used. It would make the most sense to me to always use the offset calculation.
I read Tru the code and agree with @mag2352,
The offset should always been applied. The moment an external temperature meter AND the corresponding internal Temperature meter are accesbile and return a temperate.....an offset applies. No matter if the state is in cooling or hearing mode. And no conditions. Offset applies always.
Edit: I also noticed that the target temp gets offset. Isn't it better to push the offset difference to the TRV. Most TRV have an offset slider/value. That way the target temperature also shows correctly on the TRV?
Same as #535. Ping @tttopuz
https://github.com/jmcollin78/versatile_thermostat/releases/tag/6.4.1.beta1
If someone can give it a try, i will put it in the next release. Thank you in advance
Tested and working.
Like wise. Working in both directions now. Great!
On Wed, Oct 16, 2024, 21:18 tttopuz @.***> wrote:
Tested and working.
— Reply to this email directly, view it on GitHub https://github.com/jmcollin78/versatile_thermostat/issues/467#issuecomment-2417745608, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ4APMNJFJD7NSCF4QKMDTZ323XTAVCNFSM6AAAAABIRJOHQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJXG42DKNRQHA . You are receiving this because you commented.Message ID: @.***>
Firstly, I'm making a new issue for this because it is largely unrelated to the other issues I am commenting on. This change is a very simple change. I'm using VTherm with some AC/HVAC units in Cooling mode. They have an issue where their internal temperature is very inaccurate in both heating and cooling modes. The current version of VTherm stops using the device temperature in offset calculations if the target temperature is reached. This prevents my HVAC from turning off the compressor (it still blows cold air).
Here is a quick example: The target temperature is 20 C. The external temperature sensor is reading 22 C. The HVAC internal temperature is reading 24 C. The HVAC would be set to some value under 24 C (let's say 22 C). This is a very basic calculation, but leaving the regulation algorithm aside, this makes sense: 24-22= 2 C offset. Underlying target temperature should be set to 20, but the offset adds 2, the final target temperature on the underlying unit is 22 C. Now, let's consider that the external temperature is reading 19.9 C (some value under the target of 20 C). For simplicity, let's assume the HVAC internal temperature is still reading 24 C. The calculated offset would be 4.1 C, but this wouldn't be applied due to the following lines in the code:
https://github.com/jmcollin78/versatile_thermostat/blob/2fd60074c7c0c2b483f7e2af3134d2b82dfd3cec/custom_components/versatile_thermostat/thermostat_climate.py#L204-L223
This code makes it so that the offset is not used if the current temperature is less than the target temperature. This results in the underlying entity not having the offset applied, and will result in a smaller target being applied to the underlying entity (the 4.1 C offset is no longer added). This effectively turns the AC back on when it reaches under the VTherm target temperature. The solution is simple, just remove the condition that prevents offsets from being applied if the target is reached. The commit on my fork does this (I can make a PR, but I am waiting for the PR on #240 to be approved).
mag2352/versatile_thermostat@7456a41e4970be9349e664014839b7ca622e04b6
To put the preview here, it looks like this after this simple change: