diff --git a/CHANGELOG.md b/CHANGELOG.md index 20ec7a66b..d162271b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## Ongoing -- Add Add missing Emma firmware via PR [#863](https://github.com/plugwise/python-plugwise/pull/863) +- Create an extra test-fixture for increased test coverage in the Integration via PR [#878](https://github.com/plugwise/python-plugwise/pull/878) +- Add missing Emma firmware via PR [#863](https://github.com/plugwise/python-plugwise/pull/863) - Improve test function added in #860 via PR [#862](https://github.com/plugwise/python-plugwise/pull/862) ## v1.11.3 diff --git a/fixtures/m_adam_heating_off_schedule/data.json b/fixtures/m_adam_heating_off_schedule/data.json new file mode 100644 index 000000000..3aeb08f30 --- /dev/null +++ b/fixtures/m_adam_heating_off_schedule/data.json @@ -0,0 +1,309 @@ +{ + "056ee145a816487eaa69243c3280f8bf": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "max_dhw_temperature": { + "lower_bound": 40.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 25.0, + "resolution": 0.01, + "setpoint": 50.0, + "upper_bound": 95.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 0.0, + "water_temperature": 37.0 + }, + "switches": { + "dhw_cm_switch": false + } + }, + "14df5c4dc8cb4ba69f9d1ac0eaf7c5c6": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2025-11-10T01:00:00+01:00", + "hardware": "1", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "Emma Pro", + "model_id": "170-01", + "name": "Emma", + "sensors": { + "battery": 100, + "humidity": 65.0, + "setpoint": 20.0, + "temperature": 19.5 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "60EFABFFFE89CBA0" + }, + "1772a4ea304041adb83f357b751341ff": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Tom", + "model_id": "106-03", + "name": "Tom Badkamer", + "sensors": { + "battery": 60, + "setpoint": 25.0, + "temperature": 18.6, + "temperature_difference": -0.4, + "valve_position": 100.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C8FCBA0" + }, + "ad4838d7d35c4d6ea796ee12ae5aedf8": { + "dev_class": "thermostat", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "ThermoTouch", + "model_id": "143.1", + "name": "Anna", + "sensors": { + "setpoint": 20.0, + "temperature": 19.1 + }, + "vendor": "Plugwise" + }, + "c9293d1d68ee48fc8843c6f0dee2b6be": { + "dev_class": "pumping", + "members": [ + "854f8a9b0e7e425db97f1f110e1ce4b3", + "ad4838d7d35c4d6ea796ee12ae5aedf8" + ], + "model": "Group", + "name": "Vloerverwarming", + "sensors": { + "electricity_consumed": 45.0, + "electricity_produced": 0.0, + "temperature": 20.1 + }, + "vendor": "Plugwise" + }, + "da224107914542988a88561b4452b0f6": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.9.0", + "gateway_modes": [ + "away", + "full", + "vacation" + ], + "hardware": "AME Smile 2.0 board", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "mac_address": "D40FB201CBA0", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": [ + "bleeding_cold", + "heating", + "off", + "bleeding_hot" + ], + "select_gateway_mode": "full", + "select_regulation_mode": "off", + "sensors": { + "outdoor_temperature": -1.25 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D5ACBA0" + }, + "da575e9e09b947e281fb6e3ebce3b174": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermometer", + "firmware": "2020-09-01T02:00:00+02:00", + "hardware": "1", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "Jip", + "model_id": "168-01", + "name": "Jip", + "sensors": { + "battery": 100, + "humidity": 65.8, + "setpoint": 20.0, + "temperature": 19.3 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "70AC08FFFEE1CBA0" + }, + "e2f4322d57924fa090fbbc48b3a140dc": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Lisa", + "model_id": "158-01", + "name": "Lisa Badkamer", + "sensors": { + "battery": 71, + "setpoint": 15.0, + "temperature": 17.9 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C86CBA0" + }, + "e8ef2a01ed3b4139a53bf749204fe6b4": { + "dev_class": "switching", + "members": [ + "2568cc4b9c1e401495d4741a5f89bee1", + "29542b2b6a6a4169acecc15c72a599b8" + ], + "model": "Group", + "name": "Test", + "sensors": { + "electricity_consumed": 16.5, + "electricity_produced": 0.0 + }, + "switches": { + "relay": true + }, + "vendor": "Plugwise" + }, + "f2bf9048bef64cc5b6d5110154e33c81": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Vakantie", + "Weekschema", + "Test", + "off" + ], + "climate_mode": "off", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Living room", + "preset_modes": [ + "vacation", + "no_frost", + "asleep", + "home", + "away" + ], + "select_schedule": "off", + "select_zone_profile": "active", + "sensors": { + "electricity_consumed": 60.8, + "electricity_produced": 0.0, + "temperature": 19.1 + }, + "thermostat": { + "lower_bound": 1.0, + "resolution": 0.01, + "setpoint": 20.0, + "upper_bound": 35.0 + }, + "thermostats": { + "primary": [ + "ad4838d7d35c4d6ea796ee12ae5aedf8", + "14df5c4dc8cb4ba69f9d1ac0eaf7c5c6", + "da575e9e09b947e281fb6e3ebce3b174" + ], + "secondary": [] + }, + "vendor": "Plugwise", + "zone_profiles": [ + "active", + "off", + "passive" + ] + }, + "f871b8c4d63549319221e294e4f88074": { + "active_preset": "vacation", + "available_schedules": [ + "Badkamer", + "Vakantie", + "Weekschema", + "Test", + "off" + ], + "climate_mode": "off", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bathroom", + "preset_modes": [ + "vacation", + "no_frost", + "asleep", + "home", + "away" + ], + "select_schedule": "Badkamer", + "select_zone_profile": "passive", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 17.9 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 15.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": [ + "e2f4322d57924fa090fbbc48b3a140dc" + ], + "secondary": [ + "1772a4ea304041adb83f357b751341ff" + ] + }, + "vendor": "Plugwise", + "zone_profiles": [ + "active", + "off", + "passive" + ] + } +} diff --git a/scripts/manual_fixtures.py b/scripts/manual_fixtures.py index f7a842318..77ad53935 100755 --- a/scripts/manual_fixtures.py +++ b/scripts/manual_fixtures.py @@ -199,6 +199,31 @@ def json_writer(manual_name: str, output: dict) -> None: json_writer("m_adam_heating", m_adam_heating) +# Version with select_regulation = off and an active schedule +m_adam_heating_off_schedule = m_adam_heating.copy() + +# Updates for f2bf9048bef64cc5b6d5110154e33c81" +m_adam_heating_off_schedule["f2bf9048bef64cc5b6d5110154e33c81"]["climate_mode"] = "off" +m_adam_heating_off_schedule["f2bf9048bef64cc5b6d5110154e33c81"]["control_state"] = "idle" + +# Go for e2f4 +m_adam_heating_off_schedule["f871b8c4d63549319221e294e4f88074"]["climate_mode"] = "off" +m_adam_heating_off_schedule["f871b8c4d63549319221e294e4f88074"]["control_state"] = "idle" +m_adam_heating_off_schedule["f871b8c4d63549319221e294e4f88074"]["select_schedule"] = "Badkamer" + +# Go for da22 +m_adam_heating_off_schedule["da224107914542988a88561b4452b0f6"]["select_regulation_mode"] = "off" + +# Go for 056e +m_adam_heating_off_schedule["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ + "heating_state" +] = False +m_adam_heating_off_schedule["056ee145a816487eaa69243c3280f8bf"]["sensors"][ + "intended_boiler_temperature" +] = 0.0 + +json_writer("m_adam_heating_off_schedule", m_adam_heating_off_schedule) + ### Manual Anna fixtures base_anna_manual = "anna_heatpump_heating"