Skip to content

Commit

Permalink
Merge pull request #659 from plugwise/improve-control-state
Browse files Browse the repository at this point in the history
Improve control_state processing
  • Loading branch information
bouwew authored Dec 3, 2024
2 parents 14578c7 + 8d815f1 commit b42310d
Show file tree
Hide file tree
Showing 27 changed files with 3,144 additions and 78 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v1.6.2

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

## v1.6.1

- Support python 3.13
Expand Down
20 changes: 10 additions & 10 deletions fixtures/adam_heatpump_cooling/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"off"
],
"climate_mode": "cool",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Slaapkamer SJ",
Expand Down Expand Up @@ -134,7 +134,7 @@
"off"
],
"climate_mode": "cool",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Slaapkamer DB",
Expand Down Expand Up @@ -256,7 +256,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Badkamer 2",
Expand Down Expand Up @@ -409,7 +409,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Badkamer 1",
Expand Down Expand Up @@ -449,7 +449,7 @@
"off"
],
"climate_mode": "cool",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Slaapkamer RB",
Expand Down Expand Up @@ -508,7 +508,7 @@
"off"
],
"climate_mode": "cool",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Slaapkamer SQ",
Expand Down Expand Up @@ -568,7 +568,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Keuken",
Expand Down Expand Up @@ -608,7 +608,7 @@
"off"
],
"climate_mode": "cool",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Bijkeuken",
Expand Down Expand Up @@ -746,7 +746,7 @@
"off"
],
"climate_mode": "cool",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Slaapkamer JM",
Expand Down Expand Up @@ -856,7 +856,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Woonkamer",
Expand Down
8 changes: 4 additions & 4 deletions fixtures/adam_jip/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"06aecb3d00354375924f50c47af36bd2": {
"active_preset": "no_frost",
"climate_mode": "heat",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Slaapkamer",
Expand Down Expand Up @@ -36,7 +36,7 @@
"13228dab8ce04617af318a2888b3c548": {
"active_preset": "home",
"climate_mode": "heat",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Woonkamer",
Expand Down Expand Up @@ -267,7 +267,7 @@
"d27aede973b54be484f6842d1b2802ad": {
"active_preset": "home",
"climate_mode": "heat",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Kinderkamer",
Expand Down Expand Up @@ -324,7 +324,7 @@
"d58fec52899f4f1c92e4f8fad6d8c48c": {
"active_preset": "home",
"climate_mode": "heat",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Logeerkamer",
Expand Down
7 changes: 6 additions & 1 deletion fixtures/adam_multiple_devices_per_zone/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Badkamer",
Expand Down Expand Up @@ -72,6 +73,7 @@
"off"
],
"climate_mode": "heat",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Bios",
Expand Down Expand Up @@ -136,6 +138,7 @@
"off"
],
"climate_mode": "heat",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Garage",
Expand Down Expand Up @@ -291,6 +294,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Jessie",
Expand Down Expand Up @@ -445,6 +449,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "heating",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Woonkamer",
Expand Down Expand Up @@ -630,7 +635,7 @@
"cooling_present": false,
"gateway_id": "fe799307f1624099878210aa0b9f1475",
"heater_id": "90986d591dcd426cae3ec3e8111ff730",
"item_count": 364,
"item_count": 369,
"notifications": {
"af82e4ccf9c548528166d38e560662a4": {
"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."
Expand Down
2 changes: 1 addition & 1 deletion fixtures/adam_onoff_cooling_fake_firmware/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Woonkamer",
Expand Down
3 changes: 2 additions & 1 deletion fixtures/adam_plus_anna/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"off"
],
"climate_mode": "auto",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Living room",
Expand Down Expand Up @@ -138,7 +139,7 @@
"cooling_present": false,
"gateway_id": "b128b4bbbd1f47e9bf4d756e8fb5ee94",
"heater_id": "2743216f626f43948deec1f7ab3b3d70",
"item_count": 79,
"item_count": 80,
"notifications": {
"6fb89e35caeb4b1cb275184895202d84": {
"error": "There is no OpenTherm communication with the boiler."
Expand Down
Loading

0 comments on commit b42310d

Please sign in to comment.