Repository navigation
vNext: Automatic half-degree temperature handling - #574
RobHofmann wants to merge 3 commits into
Conversation
|
Looks good. My only concern is the behaviour of zone controllers. Maybe @Twintop can give some help there. |
104e29f to
3a8fb3c
Compare
Tested this on my zone controller (LE60-13/GH, WiFi module ME31-00/C13, fw U-W05SA v1.27) on HA 2026.11.1. Short version: everything was sent and read back correctly. There's one thing I'd change for zones.
I'd rather not have that as the default for zones. After the upgrade, all four zone numbers went from step 0.5 to 1, and a 19.5 from HA goes out as The migration can't keep the old behaviour here. Zones never had the step option (the old form only offered it on The reason for off by default (a unit that answers a column but ignores it) doesn't apply to zones. Suggestions:
Fine, and needed. The AC unit answers
As for everything else:
|
Replace the device option target_temp_step with one checkbox, "Use half-degrees °C" (half_degrees, off by default). The form offers it only when the unit answers TemRec, StFahFlg, Add0.5 or Add0.1. Add0.5 and Add0.1 are now normal polled columns. A target temperature writes every half degree column the unit answers: bit 1, Add0.5 1 and Add0.1 5 for a half degree in Celsius, and 0 in all of them for a whole degree. Known units each use a different column and some answer columns they ignore, so one preferred column would break one of them. A value reads as a half degree when any answered column is set. Nothing resends a column the unit ignores; a sub-unit hold still ends at the TTL. With the option off, Celsius rounds to the nearest whole degree, a half going up. The climate entity and the zone number take their step from the device: 0.5 in Celsius with the option on, 1 otherwise. A unit is Celsius only, without the Temperature Units select, unless it answers TemUn or TemUnit and a bit column. SetTem is always Celsius, so only the bit tells the Fahrenheit degrees apart. The AC unit of a zone controller keeps its select. Config entry minor version 2: async_migrate_entry turns a step that is not a whole number into half_degrees and drops the step. YAML still accepts target_temp_step with a warning. The 4.x migration maps the step number and the 4.0.13 Add0.5 switch to half_degrees.
A zone of a zone controller only answers StFahFlg as its half degree column, which it takes, and zones always used half degrees before the option existed. So a zone without a stored choice now uses half degrees, and an existing zone keeps its 0.5 step after the upgrade. The option now also carries over to the next device in the same setup, so one choice covers all zones.
3a8fb3c to
5da51e9
Compare
|
Thanks @Twintop, both suggestions are in, and the branch is rebased onto
New tests: a zone without a stored choice has step 0.5 and sends 19.5 as |
Thanks for the quick turnaround! Set up as a real upgrade: the config entry put back at minor 1 from before this PR, zones with no stored choice, plus
|
Fixes #569, following Pedro's design in the issue. Related to #568 and #537 (master). Rebased onto
5.0-devafter #573 merged (5.0.0-alpha.110), then updated for Twintop's review.Change
half_degrees). It is off by default, except on a zone of a zone controller, and offered only when the unit answersTemRec,StFahFlg,Add0.5orAdd0.1.Add0.5as 1 andAdd0.1as 5. A whole degree sends 0 on all of them.TemUnand a bit column (TemRecorStFahFlg). The AC unit of a zone controller keeps its select.half_degrees: true. YAML still acceptstarget_temp_step, with a warning. The 4.x migration maps the 4.x step and the 4.0.13Add0.5switch tohalf_degrees.StFahFlg, which they take. The option also carries over to the next device in the same setup, so one tick covers all zones.Why every column, and not one by preference: the known units each need a different column. Pedro's unit and ours answer all three, but do not support all of them. So any fixed preference breaks one kind of unit.
The retry trap from the issue: in vNext nothing resends a value that the unit ignores. A value is only held until
HELD_VALUE_TTLruns out. Two tests intests/test_half_degrees.pyprove that nothing resends.Testing
U-CS532Z(LT)V3.75,half_degrees: truein YAML):TemRec,Add0.5andAdd0.1.SetTem 22, TemRec 1, Add0.5 1, Add0.1 5, and the unit answered all four. The next polls readTemRec 1, Add0.5 1, Add0.1 0: the unit dropsAdd0.1by itself, which still reads as 22.5.SetTem 23with all three at 0.TemReconly,StFahFlgonly,Add0.5only, anAdd0.1gateway that behaves as measured in Support Add0.1 tenths-digit half degrees #568, one with no half column, and one that answersAdd0.5but ignores it and takesTemRec. Each unit is checked for the offer, the step, the sent columns, the read back, Fahrenheit, and that three polls send no command.Risk
The unit from #537 now gets
TemRec=1together withAdd0.5=1. #537 forcedTemRecto 0 there. Nobody has tested that combination on that unit.Questions
TemRec=1withAdd0.5=1safe on the Support Add0.5 half-degree control and fix temperature-step restoration #537 unit? Could the author of Support Add0.5 half-degree control and fix temperature-step restoration #537 test it?Zones lose their automatic 0.5 step until the user ticks the box.Answered: zones default to on.Is the exception that keeps the unit select on the AC unit of a zone controller OK?Answered: fine and needed.Add0.1gateway migrates with the option off. Close Support Add0.1 tenths-digit half degrees #568 in favour of this, or merge it as a 4.x-only fix?