diff --git a/CHANGELOG.md b/CHANGELOG.md index bf97a699c..4e512dbda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog -## Ongoing +## v1.17.1 +- Implement fix for Core issue [#192756](https://github.com/home-assistant/core/issues/192756) via PR[#954](https://github.com/plugwise/python-plugwise/pull/954), this fix removes the thermozone temperature sensors to avoid creating sensors with the same name in HA. - Improve code, lower complexity via PR [#951](https://github.com/plugwise/python-plugwise/pull/951) ## v1.17.0 diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index bbe3dc774..93f86d93c 100644 --- a/fixtures/adam_heatpump_cooling/data.json +++ b/fixtures/adam_heatpump_cooling/data.json @@ -51,10 +51,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.6 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.6, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 20.5, @@ -234,10 +234,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.0 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.0, @@ -391,10 +391,10 @@ "select_schedule": "Werkdag schema", "select_zone_profile": "passive", "sensors": { - "electricity_consumed": 0.0, - "temperature": 21.9 + "electricity_consumed": 0.0 }, "thermostat": { + "current": 21.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 20.5, @@ -582,10 +582,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 21.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 20.5, @@ -657,10 +657,10 @@ "select_schedule": "off", "select_zone_profile": "passive", "sensors": { - "electricity_consumed": 3.13, - "temperature": 20.7 + "electricity_consumed": 3.13 }, "thermostat": { + "current": 20.7, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 17.0, @@ -757,10 +757,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.4 + "electricity_produced": 0.0 }, "thermostat": { + "current": 21.4, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.5, @@ -858,10 +858,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 2.13, - "electricity_produced": 0.0, - "temperature": 22.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 21.5, @@ -935,10 +935,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 18.8 + "electricity_produced": 0.0 }, "thermostat": { + "current": 18.8, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.0, @@ -1110,10 +1110,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 20.0 + "electricity_produced": 0.0 }, "thermostat": { + "current": 20.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.0, @@ -1260,10 +1260,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.5, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/fixtures/adam_jip/data.json b/fixtures/adam_jip/data.json index 89e1ef497..4ceff57a7 100644 --- a/fixtures/adam_jip/data.json +++ b/fixtures/adam_jip/data.json @@ -42,10 +42,9 @@ ], "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 24.2 - }, + "sensors": {}, "thermostat": { + "current": 24.2, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -115,10 +114,9 @@ ], "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 27.4 - }, + "sensors": {}, "thermostat": { + "current": 27.4, "lower_bound": 4.0, "resolution": 0.01, "setpoint": 9.0, @@ -387,10 +385,9 @@ ], "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 30.0 - }, + "sensors": {}, "thermostat": { + "current": 30.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -484,10 +481,9 @@ ], "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 30.0 - }, + "sensors": {}, "thermostat": { + "current": 30.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json index 44d307e86..1d912a4a0 100644 --- a/fixtures/adam_multiple_devices_per_zone/data.json +++ b/fixtures/adam_multiple_devices_per_zone/data.json @@ -67,10 +67,9 @@ "vacation" ], "select_schedule": "Badkamer Schema", - "sensors": { - "temperature": 18.9 - }, + "sensors": {}, "thermostat": { + "current": 18.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 14.0, @@ -140,10 +139,10 @@ "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 16.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -233,10 +232,9 @@ "no_frost" ], "select_schedule": "off", - "sensors": { - "temperature": 15.6 - }, + "sensors": {}, "thermostat": { + "current": 15.6, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 5.5, @@ -419,10 +417,9 @@ "asleep" ], "select_schedule": "CV Jessie", - "sensors": { - "temperature": 17.2 - }, + "sensors": {}, "thermostat": { + "current": 17.2, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 15.0, @@ -606,10 +603,10 @@ "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.6, - "electricity_produced": 0.0, - "temperature": 20.9 + "electricity_produced": 0.0 }, "thermostat": { + "current": 20.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/fixtures/adam_onoff_cooling_fake_firmware/data.json b/fixtures/adam_onoff_cooling_fake_firmware/data.json index eb94b9c0f..ece3eb664 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/data.json @@ -154,10 +154,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.5, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/fixtures/adam_plus_anna/data.json b/fixtures/adam_plus_anna/data.json index f55accad7..4da5fda90 100644 --- a/fixtures/adam_plus_anna/data.json +++ b/fixtures/adam_plus_anna/data.json @@ -44,10 +44,10 @@ "select_schedule": "Weekschema", "sensors": { "electricity_consumed": 74.2, - "electricity_produced": 0.0, - "temperature": 20.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 20.5, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 20.5, diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index ced3aa0d7..d13a3852a 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/data.json @@ -357,10 +357,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, - "electricity_produced": 0.0, - "temperature": 19.7 + "electricity_produced": 0.0 }, "thermostat": { + "current": 19.7, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 20.5, @@ -436,10 +436,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 18.7 + "electricity_produced": 0.0 }, "thermostat": { + "current": 18.7, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 20.0, diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json index e368a1b10..b967e3eae 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -309,10 +309,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 149.9, - "electricity_produced": 0.0, - "temperature": 22.4 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.4, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 18.5, @@ -386,10 +386,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 21.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.0, diff --git a/fixtures/adam_zone_per_device/data.json b/fixtures/adam_zone_per_device/data.json index 40fad1963..ec479dff6 100644 --- a/fixtures/adam_zone_per_device/data.json +++ b/fixtures/adam_zone_per_device/data.json @@ -67,10 +67,9 @@ "vacation" ], "select_schedule": "Badkamer Schema", - "sensors": { - "temperature": 18.8 - }, + "sensors": {}, "thermostat": { + "current": 18.8, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 14.0, @@ -141,10 +140,10 @@ "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 16.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -234,10 +233,9 @@ "no_frost" ], "select_schedule": "off", - "sensors": { - "temperature": 15.6 - }, + "sensors": {}, "thermostat": { + "current": 15.6, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 5.5, @@ -420,10 +418,9 @@ "asleep" ], "select_schedule": "CV Jessie", - "sensors": { - "temperature": 17.1 - }, + "sensors": {}, "thermostat": { + "current": 17.1, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 16.0, @@ -607,10 +604,10 @@ "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.8, - "electricity_produced": 0.0, - "temperature": 21.1 + "electricity_produced": 0.0 }, "thermostat": { + "current": 21.1, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/fixtures/anna_elga_2/data.json b/fixtures/anna_elga_2/data.json index e79137b14..b1c17c68e 100644 --- a/fixtures/anna_elga_2/data.json +++ b/fixtures/anna_elga_2/data.json @@ -101,6 +101,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.2, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/fixtures/anna_elga_2_cooling/data.json b/fixtures/anna_elga_2_cooling/data.json index b097c0a57..290e145d7 100644 --- a/fixtures/anna_elga_2_cooling/data.json +++ b/fixtures/anna_elga_2_cooling/data.json @@ -107,6 +107,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 24.9, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 23.0, diff --git a/fixtures/anna_elga_2_schedule_off/data.json b/fixtures/anna_elga_2_schedule_off/data.json index 464036026..060a70fff 100644 --- a/fixtures/anna_elga_2_schedule_off/data.json +++ b/fixtures/anna_elga_2_schedule_off/data.json @@ -107,6 +107,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 20.9, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/fixtures/anna_elga_no_cooling/data.json b/fixtures/anna_elga_no_cooling/data.json index 65606e0a2..cf4662d50 100644 --- a/fixtures/anna_elga_no_cooling/data.json +++ b/fixtures/anna_elga_no_cooling/data.json @@ -126,6 +126,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/fixtures/anna_heatpump_cooling/data.json b/fixtures/anna_heatpump_cooling/data.json index ee6c7fa2c..7a8a4555c 100644 --- a/fixtures/anna_heatpump_cooling/data.json +++ b/fixtures/anna_heatpump_cooling/data.json @@ -127,6 +127,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 22.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 22.0, diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/data.json b/fixtures/anna_heatpump_cooling_fake_firmware/data.json index 0d85a3a84..ec5accd55 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/data.json @@ -127,6 +127,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 22.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 22.0, diff --git a/fixtures/anna_heatpump_heating/data.json b/fixtures/anna_heatpump_heating/data.json index 23d989d48..2ed37a5bb 100644 --- a/fixtures/anna_heatpump_heating/data.json +++ b/fixtures/anna_heatpump_heating/data.json @@ -133,6 +133,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/fixtures/anna_loria_cooling_active/data.json b/fixtures/anna_loria_cooling_active/data.json index ca3338507..5c3fcf56f 100644 --- a/fixtures/anna_loria_cooling_active/data.json +++ b/fixtures/anna_loria_cooling_active/data.json @@ -64,6 +64,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 24.1, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 23.5, diff --git a/fixtures/anna_loria_driessens/data.json b/fixtures/anna_loria_driessens/data.json index 57d964813..1ac9c32a6 100644 --- a/fixtures/anna_loria_driessens/data.json +++ b/fixtures/anna_loria_driessens/data.json @@ -85,6 +85,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 21.2, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/fixtures/anna_loria_heating_idle/data.json b/fixtures/anna_loria_heating_idle/data.json index fa8ad2df0..eb6ad2336 100644 --- a/fixtures/anna_loria_heating_idle/data.json +++ b/fixtures/anna_loria_heating_idle/data.json @@ -64,6 +64,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 22.1, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/fixtures/anna_p1/data.json b/fixtures/anna_p1/data.json index 010ccfe84..f6bad5c0e 100644 --- a/fixtures/anna_p1/data.json +++ b/fixtures/anna_p1/data.json @@ -57,6 +57,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.4, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 19.0, diff --git a/fixtures/anna_v4/data.json b/fixtures/anna_v4/data.json index 7a9cc9587..8bda69cac 100644 --- a/fixtures/anna_v4/data.json +++ b/fixtures/anna_v4/data.json @@ -58,6 +58,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 20.6, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/fixtures/anna_v4_dhw/data.json b/fixtures/anna_v4_dhw/data.json index 968d224dc..b2a9e0d0b 100644 --- a/fixtures/anna_v4_dhw/data.json +++ b/fixtures/anna_v4_dhw/data.json @@ -58,6 +58,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 20.6, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/fixtures/anna_v4_no_tag/data.json b/fixtures/anna_v4_no_tag/data.json index ce4bd5fdb..24796d785 100644 --- a/fixtures/anna_v4_no_tag/data.json +++ b/fixtures/anna_v4_no_tag/data.json @@ -58,6 +58,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 20.6, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/fixtures/anna_without_boiler_fw441/data.json b/fixtures/anna_without_boiler_fw441/data.json index b774a7700..09eaceee3 100644 --- a/fixtures/anna_without_boiler_fw441/data.json +++ b/fixtures/anna_without_boiler_fw441/data.json @@ -58,6 +58,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.1, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 19.0, diff --git a/fixtures/legacy_anna/data.json b/fixtures/legacy_anna/data.json index d96fcfa16..998e863b8 100644 --- a/fixtures/legacy_anna/data.json +++ b/fixtures/legacy_anna/data.json @@ -63,6 +63,7 @@ "temperature": 20.4 }, "thermostat": { + "current": 20.4, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/fixtures/legacy_anna_2/data.json b/fixtures/legacy_anna_2/data.json index bf5e45b56..afa5ffec6 100644 --- a/fixtures/legacy_anna_2/data.json +++ b/fixtures/legacy_anna_2/data.json @@ -27,6 +27,7 @@ "temperature": 21.4 }, "thermostat": { + "current": 21.4, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 15.0, diff --git a/fixtures/m_adam_cooling/data.json b/fixtures/m_adam_cooling/data.json index 2fd028149..32a44c4e3 100644 --- a/fixtures/m_adam_cooling/data.json +++ b/fixtures/m_adam_cooling/data.json @@ -272,10 +272,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, - "electricity_produced": 0.0, - "temperature": 24.2 + "electricity_produced": 0.0 }, "thermostat": { + "current": 24.2, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 23.5, @@ -356,10 +356,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 25.8 + "electricity_produced": 0.0 }, "thermostat": { + "current": 25.8, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 25.0, diff --git a/fixtures/m_adam_heating/data.json b/fixtures/m_adam_heating/data.json index 46cf6358a..9aff579ac 100644 --- a/fixtures/m_adam_heating/data.json +++ b/fixtures/m_adam_heating/data.json @@ -273,10 +273,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, - "electricity_produced": 0.0, - "temperature": 19.1 + "electricity_produced": 0.0 }, "thermostat": { + "current": 19.1, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 20.0, @@ -352,10 +352,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 17.9 + "electricity_produced": 0.0 }, "thermostat": { + "current": 17.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 15.0, diff --git a/fixtures/m_adam_heating_off_schedule/data.json b/fixtures/m_adam_heating_off_schedule/data.json index 5615e3892..0c92056d6 100644 --- a/fixtures/m_adam_heating_off_schedule/data.json +++ b/fixtures/m_adam_heating_off_schedule/data.json @@ -273,10 +273,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, - "electricity_produced": 0.0, - "temperature": 19.1 + "electricity_produced": 0.0 }, "thermostat": { + "current": 19.1, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 20.0, @@ -352,10 +352,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 17.9 + "electricity_produced": 0.0 }, "thermostat": { + "current": 17.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 15.0, diff --git a/fixtures/m_adam_jip/data.json b/fixtures/m_adam_jip/data.json index 6a26a2dfe..5ffcd1c59 100644 --- a/fixtures/m_adam_jip/data.json +++ b/fixtures/m_adam_jip/data.json @@ -41,10 +41,9 @@ ], "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 24.2 - }, + "sensors": {}, "thermostat": { + "current": 24.2, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -114,10 +113,9 @@ ], "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 27.4 - }, + "sensors": {}, "thermostat": { + "current": 27.4, "lower_bound": 4.0, "resolution": 0.01, "setpoint": 9.0, @@ -386,10 +384,9 @@ ], "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 30.0 - }, + "sensors": {}, "thermostat": { + "current": 30.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -483,10 +480,9 @@ ], "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 30.0 - }, + "sensors": {}, "thermostat": { + "current": 30.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, diff --git a/fixtures/m_adam_multiple_devices_per_zone/data.json b/fixtures/m_adam_multiple_devices_per_zone/data.json index 0d9b61939..59db86294 100644 --- a/fixtures/m_adam_multiple_devices_per_zone/data.json +++ b/fixtures/m_adam_multiple_devices_per_zone/data.json @@ -67,10 +67,9 @@ "vacation" ], "select_schedule": "Badkamer Schema", - "sensors": { - "temperature": 18.9 - }, + "sensors": {}, "thermostat": { + "current": 18.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 14.0, @@ -140,10 +139,10 @@ "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 16.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -228,10 +227,9 @@ "no_frost" ], "select_schedule": "off", - "sensors": { - "temperature": 15.6 - }, + "sensors": {}, "thermostat": { + "current": 15.6, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 5.5, @@ -414,10 +412,9 @@ "asleep" ], "select_schedule": "CV Jessie", - "sensors": { - "temperature": 17.2 - }, + "sensors": {}, "thermostat": { + "current": 17.2, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 15.0, @@ -601,10 +598,10 @@ "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.6, - "electricity_produced": 0.0, - "temperature": 20.9 + "electricity_produced": 0.0 }, "thermostat": { + "current": 20.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/fixtures/m_anna_heatpump_cooling/data.json b/fixtures/m_anna_heatpump_cooling/data.json index 53c22db58..a8525ee33 100644 --- a/fixtures/m_anna_heatpump_cooling/data.json +++ b/fixtures/m_anna_heatpump_cooling/data.json @@ -133,6 +133,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 26.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/fixtures/m_anna_heatpump_idle/data.json b/fixtures/m_anna_heatpump_idle/data.json index 3478a471c..b587a0707 100644 --- a/fixtures/m_anna_heatpump_idle/data.json +++ b/fixtures/m_anna_heatpump_idle/data.json @@ -133,6 +133,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 23.0, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/plugwise/common.py b/plugwise/common.py index 0f40b4e1b..88cd7e36f 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -8,6 +8,7 @@ from typing import cast from plugwise.constants import ( + ADAM, ANNA, DHW_SETPOINT, GROUP_TYPES, @@ -296,7 +297,7 @@ def _get_module_data( def _create_special_dicts( self, item: str, data: GwEntityData, temp_dict: ActuatorData ) -> tuple[str, ActuatorData]: - """Update the dhw_temperature and boiler_temperature dicts with a current key.""" + """Update the boiler_temperature, dhw_temperature and thermostat dicts with a current key.""" if item == DHW_SETPOINT: item = "dhw_temperature" if DHW_SETPOINT in data["sensors"]: @@ -316,4 +317,13 @@ def _create_special_dicts( temp_dict["current"] = data["sensors"]["water_temperature"] self._count += 1 + # Solution for Core issue #192756 + if item == "thermostat" and "temperature" in data["sensors"]: + temp_dict["current"] = data["sensors"]["temperature"] + self._count += 1 + # For Anna the temperature value is duplicated, for Adam it is moved + if self.check_name(ADAM): + data["sensors"].pop("temperature") + self._count -= 1 + return item, temp_dict diff --git a/plugwise/helper.py b/plugwise/helper.py index 04c70a6ac..9c550977d 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -902,8 +902,8 @@ def _control_state(self, data: GwEntityData) -> str | bool: # Older Adam firmware does not have the control_state xml-key # Work around this by comparing the reported temperature and setpoint for a location - setpoint = data["sensors"]["setpoint"] - temperature = data["sensors"]["temperature"] + setpoint = data["thermostat"]["setpoint"] + temperature = data["thermostat"]["current"] # No cooling available in older firmware return "heating" if temperature < setpoint else "off" diff --git a/pyproject.toml b/pyproject.toml index 7c296cf3c..2289dd49a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.17.0" +version = "1.17.1" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" diff --git a/scripts/manual_fixtures.py b/scripts/manual_fixtures.py index 509d7dded..af5f7095f 100755 --- a/scripts/manual_fixtures.py +++ b/scripts/manual_fixtures.py @@ -84,8 +84,8 @@ def json_writer(manual_name: str, output: dict) -> None: m_adam_cooling["da575e9e09b947e281fb6e3ebce3b174"]["sensors"]["temperature"] = 23.8 m_adam_cooling["14df5c4dc8cb4ba69f9d1ac0eaf7c5c6"]["sensors"]["setpoint"] = 23.5 m_adam_cooling["14df5c4dc8cb4ba69f9d1ac0eaf7c5c6"]["sensors"]["temperature"] = 24.2 +m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"]["current"] = 24.2 m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"]["setpoint"] = 23.5 -m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["sensors"]["temperature"] = 24.2 m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["select_schedule"] = "off" m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["control_state"] = "cooling" m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["climate_mode"] = "cool" @@ -104,8 +104,8 @@ def json_writer(manual_name: str, output: dict) -> None: # Go for e2f4 m_adam_cooling["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"]["setpoint"] = 25.0 m_adam_cooling["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"]["temperature"] = 25.6 +m_adam_cooling["f871b8c4d63549319221e294e4f88074"]["thermostat"]["current"] = 25.8 m_adam_cooling["f871b8c4d63549319221e294e4f88074"]["thermostat"]["setpoint"] = 25.0 -m_adam_cooling["f871b8c4d63549319221e294e4f88074"]["sensors"]["temperature"] = 25.8 m_adam_cooling["f871b8c4d63549319221e294e4f88074"]["control_state"] = "cooling" m_adam_cooling["f871b8c4d63549319221e294e4f88074"]["climate_mode"] = "auto" @@ -167,11 +167,11 @@ def json_writer(manual_name: str, output: dict) -> None: zone[key] = preset # Correct setpoint for "ad4838d7d35c4d6ea796ee12ae5aedf8" +m_adam_heating["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"]["current"] = 19.1 m_adam_heating["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"]["setpoint"] = 20.0 m_adam_heating["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"]["setpoint"] = 20.0 m_adam_cooling["da575e9e09b947e281fb6e3ebce3b174"]["sensors"]["setpoint"] = 20.0 m_adam_cooling["14df5c4dc8cb4ba69f9d1ac0eaf7c5c6"]["sensors"]["setpoint"] = 20.0 -m_adam_heating["f2bf9048bef64cc5b6d5110154e33c81"]["sensors"]["temperature"] = 19.1 m_adam_heating["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"]["temperature"] = 19.1 m_adam_cooling["da575e9e09b947e281fb6e3ebce3b174"]["sensors"]["temperature"] = 19.3 m_adam_cooling["14df5c4dc8cb4ba69f9d1ac0eaf7c5c6"]["sensors"]["temperature"] = 19.5 @@ -185,9 +185,9 @@ def json_writer(manual_name: str, output: dict) -> None: # Related zone temperature is set below # Go for e2f4 +m_adam_heating["f871b8c4d63549319221e294e4f88074"]["thermostat"]["current"] = 17.9 m_adam_heating["f871b8c4d63549319221e294e4f88074"]["thermostat"]["setpoint"] = 15.0 m_adam_heating["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"]["setpoint"] = 15.0 -m_adam_heating["f871b8c4d63549319221e294e4f88074"]["sensors"]["temperature"] = 17.9 m_adam_heating["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"]["temperature"] = 17.9 m_adam_heating["f871b8c4d63549319221e294e4f88074"]["climate_mode"] = "auto" @@ -320,6 +320,9 @@ def json_writer(manual_name: str, output: dict) -> None: # Go for 3cb7 m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["control_state"] = "cooling" +m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"][ + "current" +] = 26.3 m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"][ "setpoint_low" ] = 20.5 @@ -379,5 +382,8 @@ def json_writer(manual_name: str, output: dict) -> None: m_anna_heatpump_idle["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ "cooling_activation_outdoor_temperature" ] = 25.0 +m_anna_heatpump_idle["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"]["current"] = ( + 23.0 +) json_writer("m_anna_heatpump_idle", m_anna_heatpump_idle) diff --git a/tests/data/adam/adam_heatpump_cooling.json b/tests/data/adam/adam_heatpump_cooling.json index ac7a5ad3d..35339602f 100644 --- a/tests/data/adam/adam_heatpump_cooling.json +++ b/tests/data/adam/adam_heatpump_cooling.json @@ -58,10 +58,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.6 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.6, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 20.5, @@ -240,10 +240,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.0 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.0, @@ -397,10 +397,10 @@ "select_schedule": "Werkdag schema", "select_zone_profile": "passive", "sensors": { - "electricity_consumed": 0.0, - "temperature": 21.9 + "electricity_consumed": 0.0 }, "thermostat": { + "current": 21.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 20.5, @@ -588,10 +588,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 21.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 20.5, @@ -663,10 +663,10 @@ "select_schedule": "off", "select_zone_profile": "passive", "sensors": { - "electricity_consumed": 3.13, - "temperature": 20.7 + "electricity_consumed": 3.13 }, "thermostat": { + "current": 20.7, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 17.0, @@ -764,10 +764,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.4 + "electricity_produced": 0.0 }, "thermostat": { + "current": 21.4, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.5, @@ -865,10 +865,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 2.13, - "electricity_produced": 0.0, - "temperature": 22.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 21.5, @@ -941,10 +941,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 18.8 + "electricity_produced": 0.0 }, "thermostat": { + "current": 18.8, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.0, @@ -1116,10 +1116,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 20.0 + "electricity_produced": 0.0 }, "thermostat": { + "current": 20.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.0, @@ -1267,10 +1267,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.5, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/tests/data/adam/adam_jip.json b/tests/data/adam/adam_jip.json index d6d20a150..a17b4bdc8 100644 --- a/tests/data/adam/adam_jip.json +++ b/tests/data/adam/adam_jip.json @@ -48,10 +48,8 @@ }, "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 24.2 - }, "thermostat": { + "current": 24.2, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -121,10 +119,8 @@ }, "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 27.4 - }, "thermostat": { + "current": 27.4, "lower_bound": 4.0, "resolution": 0.01, "setpoint": 9.0, @@ -393,10 +389,8 @@ }, "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 30.0 - }, "thermostat": { + "current": 30.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -490,10 +484,8 @@ }, "select_schedule": "off", "select_zone_profile": "active", - "sensors": { - "temperature": 30.0 - }, "thermostat": { + "current": 30.0, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, diff --git a/tests/data/adam/adam_multiple_devices_per_zone.json b/tests/data/adam/adam_multiple_devices_per_zone.json index ec7f3008a..bb47bb78a 100644 --- a/tests/data/adam/adam_multiple_devices_per_zone.json +++ b/tests/data/adam/adam_multiple_devices_per_zone.json @@ -73,10 +73,8 @@ "upper_bound": 30.0 }, "select_schedule": "Badkamer Schema", - "sensors": { - "temperature": 18.9 - }, "thermostat": { + "current": 18.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 14.0, @@ -146,10 +144,10 @@ "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 16.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -239,10 +237,8 @@ "upper_bound": 30.0 }, "select_schedule": "off", - "sensors": { - "temperature": 15.6 - }, "thermostat": { + "current": 15.6, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 5.5, @@ -425,10 +421,8 @@ "upper_bound": 30.0 }, "select_schedule": "CV Jessie", - "sensors": { - "temperature": 17.2 - }, "thermostat": { + "current": 17.2, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 15.0, @@ -612,10 +606,10 @@ "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.6, - "electricity_produced": 0.0, - "temperature": 20.9 + "electricity_produced": 0.0 }, "thermostat": { + "current": 20.9, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/tests/data/adam/adam_onoff_cooling_fake_firmware.json b/tests/data/adam/adam_onoff_cooling_fake_firmware.json index 93053a68a..c7c8be3f0 100644 --- a/tests/data/adam/adam_onoff_cooling_fake_firmware.json +++ b/tests/data/adam/adam_onoff_cooling_fake_firmware.json @@ -161,10 +161,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.5, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/tests/data/adam/adam_plus_anna.json b/tests/data/adam/adam_plus_anna.json index f284e8a0f..cdd225ff7 100644 --- a/tests/data/adam/adam_plus_anna.json +++ b/tests/data/adam/adam_plus_anna.json @@ -50,10 +50,10 @@ "select_schedule": "Weekschema", "sensors": { "electricity_consumed": 74.2, - "electricity_produced": 0.0, - "temperature": 20.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 20.5, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 20.5, diff --git a/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json index 3bf77a6bb..0cf5fe847 100644 --- a/tests/data/adam/adam_plus_anna_new.json +++ b/tests/data/adam/adam_plus_anna_new.json @@ -363,10 +363,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, - "electricity_produced": 0.0, - "temperature": 19.7 + "electricity_produced": 0.0 }, "thermostat": { + "current": 19.7, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 20.5, @@ -442,10 +442,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 18.7 + "electricity_produced": 0.0 }, "thermostat": { + "current": 18.7, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 20.0, diff --git a/tests/data/adam/adam_plus_anna_new_regulation_off.json b/tests/data/adam/adam_plus_anna_new_regulation_off.json index 34a90d841..66280c7f2 100644 --- a/tests/data/adam/adam_plus_anna_new_regulation_off.json +++ b/tests/data/adam/adam_plus_anna_new_regulation_off.json @@ -315,10 +315,10 @@ "select_zone_profile": "active", "sensors": { "electricity_consumed": 149.9, - "electricity_produced": 0.0, - "temperature": 22.4 + "electricity_produced": 0.0 }, "thermostat": { + "current": 22.4, "lower_bound": 1.0, "resolution": 0.01, "setpoint": 18.5, @@ -392,10 +392,10 @@ "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 21.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 18.0, diff --git a/tests/data/adam/adam_zone_per_device.json b/tests/data/adam/adam_zone_per_device.json index aa1e69c03..0fed7fc62 100644 --- a/tests/data/adam/adam_zone_per_device.json +++ b/tests/data/adam/adam_zone_per_device.json @@ -73,10 +73,8 @@ "upper_bound": 30.0 }, "select_schedule": "Badkamer Schema", - "sensors": { - "temperature": 18.8 - }, "thermostat": { + "current": 18.8, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 14.0, @@ -147,10 +145,10 @@ "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 + "electricity_produced": 0.0 }, "thermostat": { + "current": 16.5, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 13.0, @@ -240,10 +238,8 @@ "upper_bound": 30.0 }, "select_schedule": "off", - "sensors": { - "temperature": 15.6 - }, "thermostat": { + "current": 15.6, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 5.5, @@ -426,10 +422,8 @@ "upper_bound": 30.0 }, "select_schedule": "CV Jessie", - "sensors": { - "temperature": 17.1 - }, "thermostat": { + "current": 17.1, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 16.0, @@ -613,10 +607,10 @@ "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.8, - "electricity_produced": 0.0, - "temperature": 21.1 + "electricity_produced": 0.0 }, "thermostat": { + "current": 21.1, "lower_bound": 0.0, "resolution": 0.01, "setpoint": 21.5, diff --git a/tests/data/anna/anna_elga_2.json b/tests/data/anna/anna_elga_2.json index a03fad99c..4d4e2d835 100644 --- a/tests/data/anna/anna_elga_2.json +++ b/tests/data/anna/anna_elga_2.json @@ -108,6 +108,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.2, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/tests/data/anna/anna_elga_2_cooling.json b/tests/data/anna/anna_elga_2_cooling.json index a269db11d..0c48c8948 100644 --- a/tests/data/anna/anna_elga_2_cooling.json +++ b/tests/data/anna/anna_elga_2_cooling.json @@ -114,6 +114,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 24.9, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 23.0, diff --git a/tests/data/anna/anna_elga_2_cooling_UPDATED_DATA.json b/tests/data/anna/anna_elga_2_cooling_UPDATED_DATA.json index ed6c69b2c..95039e9c8 100644 --- a/tests/data/anna/anna_elga_2_cooling_UPDATED_DATA.json +++ b/tests/data/anna/anna_elga_2_cooling_UPDATED_DATA.json @@ -77,6 +77,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 18.9, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/tests/data/anna/anna_elga_2_schedule_off.json b/tests/data/anna/anna_elga_2_schedule_off.json index d77e87d4f..ff9fb2e5d 100644 --- a/tests/data/anna/anna_elga_2_schedule_off.json +++ b/tests/data/anna/anna_elga_2_schedule_off.json @@ -114,6 +114,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 20.9, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/tests/data/anna/anna_elga_no_cooling.json b/tests/data/anna/anna_elga_no_cooling.json index ae9f83574..505f88524 100644 --- a/tests/data/anna/anna_elga_no_cooling.json +++ b/tests/data/anna/anna_elga_no_cooling.json @@ -132,6 +132,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/tests/data/anna/anna_heatpump_cooling.json b/tests/data/anna/anna_heatpump_cooling.json index 40d6a3836..858e3b716 100644 --- a/tests/data/anna/anna_heatpump_cooling.json +++ b/tests/data/anna/anna_heatpump_cooling.json @@ -134,6 +134,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 22.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 22.0, diff --git a/tests/data/anna/anna_heatpump_cooling_fake_firmware.json b/tests/data/anna/anna_heatpump_cooling_fake_firmware.json index 0f087d1ea..2eaf8b452 100644 --- a/tests/data/anna/anna_heatpump_cooling_fake_firmware.json +++ b/tests/data/anna/anna_heatpump_cooling_fake_firmware.json @@ -134,6 +134,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 22.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 22.0, diff --git a/tests/data/anna/anna_heatpump_heating.json b/tests/data/anna/anna_heatpump_heating.json index 4377c171b..3d1c712dd 100644 --- a/tests/data/anna/anna_heatpump_heating.json +++ b/tests/data/anna/anna_heatpump_heating.json @@ -140,6 +140,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.3, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/tests/data/anna/anna_loria_cooling_active.json b/tests/data/anna/anna_loria_cooling_active.json index af0c5762b..e73f2bf2c 100644 --- a/tests/data/anna/anna_loria_cooling_active.json +++ b/tests/data/anna/anna_loria_cooling_active.json @@ -71,6 +71,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 24.1, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 23.5, diff --git a/tests/data/anna/anna_loria_driessens.json b/tests/data/anna/anna_loria_driessens.json index 31b4dfee3..9974e9ab0 100644 --- a/tests/data/anna/anna_loria_driessens.json +++ b/tests/data/anna/anna_loria_driessens.json @@ -92,6 +92,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 21.2, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/tests/data/anna/anna_loria_heating_idle.json b/tests/data/anna/anna_loria_heating_idle.json index 0b11de8ab..4d8fe8008 100644 --- a/tests/data/anna/anna_loria_heating_idle.json +++ b/tests/data/anna/anna_loria_heating_idle.json @@ -71,6 +71,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 22.1, "lower_bound": 4.0, "resolution": 0.1, "setpoint_high": 30.0, diff --git a/tests/data/anna/anna_p1.json b/tests/data/anna/anna_p1.json index 315b7122c..afb431852 100644 --- a/tests/data/anna/anna_p1.json +++ b/tests/data/anna/anna_p1.json @@ -63,6 +63,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.4, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 19.0, diff --git a/tests/data/anna/anna_v4.json b/tests/data/anna/anna_v4.json index 09c03509d..32edb20dd 100644 --- a/tests/data/anna/anna_v4.json +++ b/tests/data/anna/anna_v4.json @@ -64,6 +64,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 20.6, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/tests/data/anna/anna_v4_UPDATED_DATA.json b/tests/data/anna/anna_v4_UPDATED_DATA.json index e42f05441..5a0917d58 100644 --- a/tests/data/anna/anna_v4_UPDATED_DATA.json +++ b/tests/data/anna/anna_v4_UPDATED_DATA.json @@ -34,6 +34,7 @@ }, "01b85360fdd243d0aaad4d6ac2a5ba7e": { "thermostat": { + "current": 19.5, "setpoint": 19.5, "lower_bound": 4.0, "upper_bound": 30.0, diff --git a/tests/data/anna/anna_v4_dhw.json b/tests/data/anna/anna_v4_dhw.json index dd761e06e..ebca576b6 100644 --- a/tests/data/anna/anna_v4_dhw.json +++ b/tests/data/anna/anna_v4_dhw.json @@ -64,6 +64,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 20.6, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/tests/data/anna/anna_v4_no_tag.json b/tests/data/anna/anna_v4_no_tag.json index d37676268..d15d45376 100644 --- a/tests/data/anna/anna_v4_no_tag.json +++ b/tests/data/anna/anna_v4_no_tag.json @@ -64,6 +64,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 20.6, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/tests/data/anna/anna_without_boiler_fw441.json b/tests/data/anna/anna_without_boiler_fw441.json index 291df63f1..1cb2f6669 100644 --- a/tests/data/anna/anna_without_boiler_fw441.json +++ b/tests/data/anna/anna_without_boiler_fw441.json @@ -64,6 +64,7 @@ "upper_bound": 2.0 }, "thermostat": { + "current": 19.1, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 19.0, diff --git a/tests/data/anna/legacy_anna.json b/tests/data/anna/legacy_anna.json index 41e4f1159..ed1e6795e 100644 --- a/tests/data/anna/legacy_anna.json +++ b/tests/data/anna/legacy_anna.json @@ -63,6 +63,7 @@ "temperature": 20.4 }, "thermostat": { + "current": 20.4, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 20.5, diff --git a/tests/data/anna/legacy_anna_2.json b/tests/data/anna/legacy_anna_2.json index 999849208..2241c45e1 100644 --- a/tests/data/anna/legacy_anna_2.json +++ b/tests/data/anna/legacy_anna_2.json @@ -27,6 +27,7 @@ "temperature": 21.4 }, "thermostat": { + "current": 21.4, "lower_bound": 4.0, "resolution": 0.1, "setpoint": 15.0, diff --git a/tests/test_anna.py b/tests/test_anna.py index ddf64de2c..2012f0814 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -31,7 +31,7 @@ async def test_connect_anna_v4(self): await self.device_test(api, "2020-04-05 00:00:01", testdata) assert api.gateway_id == "0466eae8520144c78afb29628384edeb" - assert self.entity_items == 92 + assert self.entity_items == 93 assert not self.notifications assert not self.cooling_present @@ -103,7 +103,7 @@ async def test_connect_anna_v4_dhw(self): ) await self.device_test(api, "2020-04-05 00:00:01", testdata) - assert self.entity_items == 92 + assert self.entity_items == 93 assert not self.notifications result = await self.tinker_thermostat( @@ -132,7 +132,7 @@ async def test_connect_anna_v4_no_tag(self): ) await self.device_test(api, "2020-04-05 00:00:01", testdata) - assert self.entity_items == 92 + assert self.entity_items == 93 result = await self.tinker_thermostat( api, @@ -160,7 +160,7 @@ async def test_connect_anna_without_boiler_fw441(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 62 + assert self.entity_items == 63 assert not self.notifications result = await self.tinker_thermostat( @@ -188,7 +188,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test(api, "2020-04-12 00:00:01", testdata) assert api.gateway_id == "015ae9ea3f964e668e490fa39da3870b" - assert self.entity_items == 101 + assert self.entity_items == 102 assert not self.notifications assert self.cooling_present assert not self._cooling_enabled @@ -218,7 +218,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( api, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 97 + assert self.entity_items == 98 await api.close_connection() await self.disconnect(server, client) @@ -243,7 +243,7 @@ async def test_connect_anna_heatpump_cooling(self): ) await self.device_test(api, "2020-04-19 00:00:01", testdata) - assert self.entity_items == 97 + assert self.entity_items == 98 assert self.cooling_present assert not self.notifications @@ -289,7 +289,7 @@ async def test_connect_anna_heatpump_cooling_fake_firmware(self): ) await self.device_test(api, "2020-04-19 00:00:01", testdata) - assert self.entity_items == 97 + assert self.entity_items == 98 assert self.cooling_present assert self._cooling_enabled assert self._cooling_active @@ -315,7 +315,7 @@ async def test_connect_anna_elga_no_cooling(self): await self.device_test(api, "2020-04-12 00:00:01", testdata) assert api.gateway_id == "015ae9ea3f964e668e490fa39da3870b" - assert self.entity_items == 92 + assert self.entity_items == 93 assert not self.notifications assert not self.cooling_present @@ -338,7 +338,7 @@ async def test_connect_anna_elga_2(self): ) await self.device_test(api, "2022-03-13 00:00:01", testdata) - assert self.entity_items == 92 + assert self.entity_items == 93 assert api.gateway_id == "fb49af122f6e4b0f91267e1cf7666d6f" assert self.cooling_present assert not self._cooling_enabled @@ -358,7 +358,7 @@ async def test_connect_anna_elga_2_schedule_off(self): await self.device_test(api, "2022-03-13 00:00:01", testdata) assert not self._cooling_enabled - assert self.entity_items == 95 + assert self.entity_items == 96 result = await self.tinker_thermostat( api, @@ -389,7 +389,7 @@ async def test_connect_anna_elga_2_cooling(self): ) await self.device_test(api, "2022-03-10 00:00:01", testdata) - assert self.entity_items == 95 + assert self.entity_items == 96 assert not self.notifications assert self.cooling_present @@ -442,7 +442,7 @@ async def test_connect_anna_loria_heating_idle(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 98 + assert self.entity_items == 99 assert self.cooling_present assert not self._cooling_enabled @@ -511,7 +511,7 @@ async def test_connect_anna_loria_cooling_active(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 98 + assert self.entity_items == 99 assert self.cooling_present assert self._cooling_enabled @@ -573,7 +573,7 @@ async def test_connect_anna_loria_driessens(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 99 + assert self.entity_items == 100 assert self.cooling_present assert not self._cooling_enabled @@ -596,7 +596,7 @@ async def test_connect_anna_p1(self): ) await self.device_test(api, "2025-11-02 00:00:01", testdata) - assert self.entity_items == 106 + assert self.entity_items == 107 await api.close_connection() await self.disconnect(server, client) diff --git a/tests/test_legacy_anna.py b/tests/test_legacy_anna.py index 5d16817ab..abd8b4674 100644 --- a/tests/test_legacy_anna.py +++ b/tests/test_legacy_anna.py @@ -30,7 +30,7 @@ async def test_connect_legacy_anna(self): await self.device_test(api, "2020-03-22 00:00:01", testdata) assert api.gateway_id == "0000aaaa0000aaaa0000aaaa0000aa00" - assert self.entity_items == 47 + assert self.entity_items == 48 assert not api.reboot result = await self.tinker_legacy_thermostat(api, schedule_on=False) @@ -65,7 +65,7 @@ async def test_connect_legacy_anna_2(self): await self.device_test(api, "2020-05-03 00:00:01", testdata) assert api.gateway_id == "be81e3f8275b4129852c4d8d550ae2eb" - assert self.entity_items == 46 + assert self.entity_items == 47 result = await self.tinker_legacy_thermostat(api) assert result