Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugwise/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def _create_gw_entities(self, appl: Munch) -> None:
"model": appl.model,
"model_id": appl.model_id,
"name": appl.name,
"zigbee_mac_address": appl.zigbee_mac,
"vendor": appl.vendor_name,
"zigbee_mac_address": appl.zigbee_mac,
}.items():
if value is not None or key == "location":
appl_key = cast(ApplianceType, key)
Expand Down Expand Up @@ -205,7 +205,7 @@ def _get_group_switches(self) -> dict[str, GwEntityData]:
"members": members,
"vendor": "Plugwise",
}
self._count += 4
self._count += 5

return switch_groups

Expand Down
2 changes: 1 addition & 1 deletion plugwise/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def _scan_thermostats(self) -> None:
},
"vendor": "Plugwise",
}
self._count += 3
self._count += 5

def _match_locations(self) -> dict[str, ThermoLoc]:
"""Helper-function for _scan_thermostats().
Expand Down
1 change: 1 addition & 0 deletions plugwise/legacy/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def _climate_data(self, entity: GwEntityData, data: GwEntityData) -> None:
def _get_anna_control_state(self, data: GwEntityData) -> None:
"""Set the thermostat control_state based on the opentherm/onoff device state."""
data["control_state"] = "idle"
self._count += 1
for entity in self.gw_entities.values():
if entity["dev_class"] != "heater_central":
continue
Expand Down
1 change: 1 addition & 0 deletions tests/data/adam/adam_heatpump_cooling.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"notifications": {},
"regulation_modes": [
"heating",
"off",
Expand Down
25 changes: 21 additions & 4 deletions tests/data/adam/adam_jip.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"devices": {
"06aecb3d00354375924f50c47af36bd2": {
"active_preset": "no_frost",
"available_schedules": [],
"climate_mode": "heat",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Slaapkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": null,
"sensors": {
"temperature": 24.2
},
Expand All @@ -19,15 +22,19 @@
"thermostats": {
"primary": ["1346fbd8498d4dbcab7e18d51b771f3d"],
"secondary": ["356b65335e274d769c338223e7af9c33"]
}
},
"vendor": "Plugwise"
},
"13228dab8ce04617af318a2888b3c548": {
"active_preset": "home",
"available_schedules": [],
"climate_mode": "heat",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Woonkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": null,
"sensors": {
"temperature": 27.4
},
Expand All @@ -40,7 +47,8 @@
"thermostats": {
"primary": ["f61f1a2535f54f52ad006a3d18e459ca"],
"secondary": ["833de10f269c4deab58fb9df69901b4e"]
}
},
"vendor": "Plugwise"
},
"1346fbd8498d4dbcab7e18d51b771f3d": {
"available": true,
Expand Down Expand Up @@ -222,6 +230,7 @@
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"notifications": {},
"regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"],
"select_gateway_mode": "full",
"select_regulation_mode": "heating",
Expand All @@ -233,11 +242,14 @@
},
"d27aede973b54be484f6842d1b2802ad": {
"active_preset": "home",
"available_schedules": [],
"climate_mode": "heat",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Kinderkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": null,
"sensors": {
"temperature": 30.0
},
Expand All @@ -250,7 +262,8 @@
"thermostats": {
"primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"],
"secondary": ["d4496250d0e942cfa7aea3476e9070d5"]
}
},
"vendor": "Plugwise"
},
"d4496250d0e942cfa7aea3476e9070d5": {
"available": true,
Expand Down Expand Up @@ -278,11 +291,14 @@
},
"d58fec52899f4f1c92e4f8fad6d8c48c": {
"active_preset": "home",
"available_schedules": [],
"climate_mode": "heat",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Logeerkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": null,
"sensors": {
"temperature": 30.0
},
Expand All @@ -295,7 +311,8 @@
"thermostats": {
"primary": ["a6abc6a129ee499c88a4d420cc413b47"],
"secondary": ["1da4d325838e4ad8aac12177214505c9"]
}
},
"vendor": "Plugwise"
},
"e4684553153b44afbef2200885f379dc": {
"available": true,
Expand Down
31 changes: 18 additions & 13 deletions tests/data/adam/adam_multiple_devices_per_zone.json
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,19 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A11"
},
"e8ef2a01ed3b4139a53bf749204fe6b4": {
"dev_class": "switching",
"members": [
"02cf28bfec924855854c544690a609ef",
"4a810418d5394b3f82727340b91ba740"
],
"model": "Switchgroup",
"name": "Test",
"switches": {
"relay": true
},
"vendor": "Plugwise"
},
"f1fee6043d3642a9b0a65297455f008e": {
"available": true,
"binary_sensors": {
Expand All @@ -567,19 +580,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A08"
},
"e8ef2a01ed3b4139a53bf749204fe6b4": {
"dev_class": "switching",
"members": [
"02cf28bfec924855854c544690a609ef",
"4a810418d5394b3f82727340b91ba740"
],
"model": "Switchgroup",
"name": "Test",
"switches": {
"relay": true
},
"vendor": "Plugwise"
},
"fe799307f1624099878210aa0b9f1475": {
"binary_sensors": {
"plugwise_notification": true
Expand All @@ -592,6 +592,11 @@
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"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."
}
},
"sensors": {
"outdoor_temperature": 7.81
},
Expand Down
5 changes: 4 additions & 1 deletion tests/data/adam/adam_onoff_cooling_fake_firmware.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"notifications": {},
"regulation_modes": [
"heating",
"off",
Expand Down Expand Up @@ -88,6 +89,7 @@
"climate_mode": "auto",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Woonkamer",
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
"select_schedule": "Werkdag schema",
Expand All @@ -105,7 +107,8 @@
"thermostats": {
"primary": ["ca79d23ae0094120b877558734cff85c"],
"secondary": []
}
},
"vendor": "Plugwise"
}
}
}
5 changes: 5 additions & 0 deletions tests/data/adam/adam_plus_anna.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"notifications": {
"6fb89e35caeb4b1cb275184895202d84": {
"error": "There is no OpenTherm communication with the boiler."
}
},
"sensors": {
"outdoor_temperature": 11.9
},
Expand Down
12 changes: 9 additions & 3 deletions tests/data/adam/adam_plus_anna_new.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"notifications": {},
"regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"],
"select_gateway_mode": "full",
"select_regulation_mode": "heating",
Expand Down Expand Up @@ -214,7 +215,8 @@
"name": "Test",
"switches": {
"relay": true
}
},
"vendor": "Plugwise"
},
"f2bf9048bef64cc5b6d5110154e33c81": {
"active_preset": "home",
Expand All @@ -228,6 +230,7 @@
"climate_mode": "auto",
"control_state": "heating",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Living room",
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "Weekschema",
Expand All @@ -245,7 +248,8 @@
"thermostats": {
"primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"],
"secondary": []
}
},
"vendor": "Plugwise"
},
"f871b8c4d63549319221e294e4f88074": {
"active_preset": "home",
Expand All @@ -259,6 +263,7 @@
"climate_mode": "auto",
"control_state": "preheating",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Bathroom",
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "Badkamer",
Expand All @@ -276,7 +281,8 @@
"thermostats": {
"primary": ["e2f4322d57924fa090fbbc48b3a140dc"],
"secondary": ["1772a4ea304041adb83f357b751341ff"]
}
},
"vendor": "Plugwise"
}
}
}
12 changes: 9 additions & 3 deletions tests/data/adam/adam_plus_anna_new_regulation_off.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"notifications": {},
"regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"],
"select_gateway_mode": "full",
"select_regulation_mode": "off",
Expand Down Expand Up @@ -214,7 +215,8 @@
"name": "Test",
"switches": {
"relay": true
}
},
"vendor": "Plugwise"
},
"f2bf9048bef64cc5b6d5110154e33c81": {
"active_preset": "home",
Expand All @@ -228,6 +230,7 @@
"climate_mode": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Living room",
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "off",
Expand All @@ -245,7 +248,8 @@
"thermostats": {
"primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"],
"secondary": []
}
},
"vendor": "Plugwise"
},
"f871b8c4d63549319221e294e4f88074": {
"active_preset": "home",
Expand All @@ -259,6 +263,7 @@
"climate_mode": "off",
"control_state": "idle",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Bathroom",
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "off",
Expand All @@ -276,7 +281,8 @@
"thermostats": {
"primary": ["e2f4322d57924fa090fbbc48b3a140dc"],
"secondary": ["1772a4ea304041adb83f357b751341ff"]
}
},
"vendor": "Plugwise"
}
}
}
5 changes: 5 additions & 0 deletions tests/data/adam/adam_zone_per_device.json
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,11 @@
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"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."
}
},
"sensors": {
"outdoor_temperature": 7.69
},
Expand Down
1 change: 1 addition & 0 deletions tests/data/anna/anna_elga_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"model": "Gateway",
"model_id": "smile_thermo",
"name": "Smile Anna",
"notifications": {},
"sensors": {
"outdoor_temperature": 6.38
},
Expand Down
1 change: 1 addition & 0 deletions tests/data/anna/anna_elga_2_cooling.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"model": "Gateway",
"model_id": "smile_thermo",
"name": "Smile Anna",
"notifications": {},
"sensors": {
"outdoor_temperature": 31.0
},
Expand Down
1 change: 1 addition & 0 deletions tests/data/anna/anna_elga_2_schedule_off.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"model": "Gateway",
"model_id": "smile_thermo",
"name": "Smile Anna",
"notifications": {},
"sensors": {
"outdoor_temperature": 13.0
},
Expand Down
1 change: 1 addition & 0 deletions tests/data/anna/anna_elga_no_cooling.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"model": "Gateway",
"model_id": "smile_thermo",
"name": "Smile Anna",
"notifications": {},
"sensors": {
"outdoor_temperature": 20.2
},
Expand Down
1 change: 1 addition & 0 deletions tests/data/anna/anna_heatpump_cooling.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"model": "Gateway",
"model_id": "smile_thermo",
"name": "Smile Anna",
"notifications": {},
"sensors": {
"outdoor_temperature": 22.0
},
Expand Down
Loading