Skip to content

Commit b42310d

Browse files
authored
Merge pull request #659 from plugwise/improve-control-state
Improve control_state processing
2 parents 14578c7 + 8d815f1 commit b42310d

File tree

27 files changed

+3144
-78
lines changed

27 files changed

+3144
-78
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## v1.6.2
4+
5+
- Improve control_state processing:
6+
- Change value from `off` to `idle` to better match HA Core `HVACAction` states.
7+
- Handle difference between old and new Adam firmware: set `control_state` based on `setpoint` vs `temperature` for older firmware.
8+
- Implement fix for [#776](https://github.com/plugwise/plugwise-beta/issues/776), move it from the integration to the backend library.
9+
- Add a test to cover the code that fixes #776.
10+
- Update related fixtures and test-data json files.
11+
312
## v1.6.1
413

514
- Support python 3.13

fixtures/adam_heatpump_cooling/all_data.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"off"
1010
],
1111
"climate_mode": "cool",
12-
"control_state": "off",
12+
"control_state": "idle",
1313
"dev_class": "climate",
1414
"model": "ThermoZone",
1515
"name": "Slaapkamer SJ",
@@ -134,7 +134,7 @@
134134
"off"
135135
],
136136
"climate_mode": "cool",
137-
"control_state": "off",
137+
"control_state": "idle",
138138
"dev_class": "climate",
139139
"model": "ThermoZone",
140140
"name": "Slaapkamer DB",
@@ -256,7 +256,7 @@
256256
"off"
257257
],
258258
"climate_mode": "auto",
259-
"control_state": "off",
259+
"control_state": "idle",
260260
"dev_class": "climate",
261261
"model": "ThermoZone",
262262
"name": "Badkamer 2",
@@ -409,7 +409,7 @@
409409
"off"
410410
],
411411
"climate_mode": "auto",
412-
"control_state": "off",
412+
"control_state": "idle",
413413
"dev_class": "climate",
414414
"model": "ThermoZone",
415415
"name": "Badkamer 1",
@@ -449,7 +449,7 @@
449449
"off"
450450
],
451451
"climate_mode": "cool",
452-
"control_state": "off",
452+
"control_state": "idle",
453453
"dev_class": "climate",
454454
"model": "ThermoZone",
455455
"name": "Slaapkamer RB",
@@ -508,7 +508,7 @@
508508
"off"
509509
],
510510
"climate_mode": "cool",
511-
"control_state": "off",
511+
"control_state": "idle",
512512
"dev_class": "climate",
513513
"model": "ThermoZone",
514514
"name": "Slaapkamer SQ",
@@ -568,7 +568,7 @@
568568
"off"
569569
],
570570
"climate_mode": "auto",
571-
"control_state": "off",
571+
"control_state": "idle",
572572
"dev_class": "climate",
573573
"model": "ThermoZone",
574574
"name": "Keuken",
@@ -608,7 +608,7 @@
608608
"off"
609609
],
610610
"climate_mode": "cool",
611-
"control_state": "off",
611+
"control_state": "idle",
612612
"dev_class": "climate",
613613
"model": "ThermoZone",
614614
"name": "Bijkeuken",
@@ -746,7 +746,7 @@
746746
"off"
747747
],
748748
"climate_mode": "cool",
749-
"control_state": "off",
749+
"control_state": "idle",
750750
"dev_class": "climate",
751751
"model": "ThermoZone",
752752
"name": "Slaapkamer JM",
@@ -856,7 +856,7 @@
856856
"off"
857857
],
858858
"climate_mode": "auto",
859-
"control_state": "off",
859+
"control_state": "idle",
860860
"dev_class": "climate",
861861
"model": "ThermoZone",
862862
"name": "Woonkamer",

fixtures/adam_jip/all_data.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"06aecb3d00354375924f50c47af36bd2": {
44
"active_preset": "no_frost",
55
"climate_mode": "heat",
6-
"control_state": "off",
6+
"control_state": "idle",
77
"dev_class": "climate",
88
"model": "ThermoZone",
99
"name": "Slaapkamer",
@@ -36,7 +36,7 @@
3636
"13228dab8ce04617af318a2888b3c548": {
3737
"active_preset": "home",
3838
"climate_mode": "heat",
39-
"control_state": "off",
39+
"control_state": "idle",
4040
"dev_class": "climate",
4141
"model": "ThermoZone",
4242
"name": "Woonkamer",
@@ -267,7 +267,7 @@
267267
"d27aede973b54be484f6842d1b2802ad": {
268268
"active_preset": "home",
269269
"climate_mode": "heat",
270-
"control_state": "off",
270+
"control_state": "idle",
271271
"dev_class": "climate",
272272
"model": "ThermoZone",
273273
"name": "Kinderkamer",
@@ -324,7 +324,7 @@
324324
"d58fec52899f4f1c92e4f8fad6d8c48c": {
325325
"active_preset": "home",
326326
"climate_mode": "heat",
327-
"control_state": "off",
327+
"control_state": "idle",
328328
"dev_class": "climate",
329329
"model": "ThermoZone",
330330
"name": "Logeerkamer",

fixtures/adam_multiple_devices_per_zone/all_data.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"off"
3333
],
3434
"climate_mode": "auto",
35+
"control_state": "idle",
3536
"dev_class": "climate",
3637
"model": "ThermoZone",
3738
"name": "Badkamer",
@@ -72,6 +73,7 @@
7273
"off"
7374
],
7475
"climate_mode": "heat",
76+
"control_state": "idle",
7577
"dev_class": "climate",
7678
"model": "ThermoZone",
7779
"name": "Bios",
@@ -136,6 +138,7 @@
136138
"off"
137139
],
138140
"climate_mode": "heat",
141+
"control_state": "idle",
139142
"dev_class": "climate",
140143
"model": "ThermoZone",
141144
"name": "Garage",
@@ -291,6 +294,7 @@
291294
"off"
292295
],
293296
"climate_mode": "auto",
297+
"control_state": "idle",
294298
"dev_class": "climate",
295299
"model": "ThermoZone",
296300
"name": "Jessie",
@@ -445,6 +449,7 @@
445449
"off"
446450
],
447451
"climate_mode": "auto",
452+
"control_state": "heating",
448453
"dev_class": "climate",
449454
"model": "ThermoZone",
450455
"name": "Woonkamer",
@@ -630,7 +635,7 @@
630635
"cooling_present": false,
631636
"gateway_id": "fe799307f1624099878210aa0b9f1475",
632637
"heater_id": "90986d591dcd426cae3ec3e8111ff730",
633-
"item_count": 364,
638+
"item_count": 369,
634639
"notifications": {
635640
"af82e4ccf9c548528166d38e560662a4": {
636641
"warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device."

fixtures/adam_onoff_cooling_fake_firmware/all_data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"off"
9090
],
9191
"climate_mode": "auto",
92-
"control_state": "off",
92+
"control_state": "idle",
9393
"dev_class": "climate",
9494
"model": "ThermoZone",
9595
"name": "Woonkamer",

fixtures/adam_plus_anna/all_data.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"off"
88
],
99
"climate_mode": "auto",
10+
"control_state": "idle",
1011
"dev_class": "climate",
1112
"model": "ThermoZone",
1213
"name": "Living room",
@@ -138,7 +139,7 @@
138139
"cooling_present": false,
139140
"gateway_id": "b128b4bbbd1f47e9bf4d756e8fb5ee94",
140141
"heater_id": "2743216f626f43948deec1f7ab3b3d70",
141-
"item_count": 79,
142+
"item_count": 80,
142143
"notifications": {
143144
"6fb89e35caeb4b1cb275184895202d84": {
144145
"error": "There is no OpenTherm communication with the boiler."

0 commit comments

Comments
 (0)