diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2f97c0f90..785fd947a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## Ongoing
+
+- Remove switching groups
+
## v1.11.0
- Extend feature: support pumping group, add group sensors
diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json
index 364d71e59..56329565a 100644
--- a/fixtures/adam_multiple_devices_per_zone/data.json
+++ b/fixtures/adam_multiple_devices_per_zone/data.json
@@ -554,23 +554,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A11"
},
- "e8ef2a01ed3b4139a53bf749204fe6b4": {
- "dev_class": "switching",
- "members": [
- "02cf28bfec924855854c544690a609ef",
- "4a810418d5394b3f82727340b91ba740"
- ],
- "model": "Group",
- "name": "Test",
- "sensors": {
- "electricity_consumed": 14.8,
- "electricity_produced": 0.0
- },
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
"f1fee6043d3642a9b0a65297455f008e": {
"available": true,
"binary_sensors": {
diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json
index afa38abd8..15f7e42ab 100644
--- a/fixtures/adam_plus_anna_new/data.json
+++ b/fixtures/adam_plus_anna_new/data.json
@@ -266,23 +266,6 @@
"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": [
diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json
index 0a859e23a..929ddb86e 100644
--- a/fixtures/adam_plus_anna_new_regulation_off/data.json
+++ b/fixtures/adam_plus_anna_new_regulation_off/data.json
@@ -219,23 +219,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "000D6F000C869B61"
},
- "e8ef2a01ed3b4139a53bf749204fe6b4": {
- "dev_class": "switching",
- "members": [
- "2568cc4b9c1e401495d4741a5f89bee1",
- "29542b2b6a6a4169acecc15c72a599b8"
- ],
- "model": "Group",
- "name": "Test",
- "sensors": {
- "electricity_consumed": 14.8,
- "electricity_produced": 0.0
- },
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
"f2bf9048bef64cc5b6d5110154e33c81": {
"active_preset": "home",
"available_schedules": [
diff --git a/fixtures/m_adam_cooling/data.json b/fixtures/m_adam_cooling/data.json
index 9b95475eb..68e4007e8 100644
--- a/fixtures/m_adam_cooling/data.json
+++ b/fixtures/m_adam_cooling/data.json
@@ -182,23 +182,6 @@
"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": [
diff --git a/fixtures/m_adam_heating/data.json b/fixtures/m_adam_heating/data.json
index 47a8fdeb2..e0436f8b0 100644
--- a/fixtures/m_adam_heating/data.json
+++ b/fixtures/m_adam_heating/data.json
@@ -181,23 +181,6 @@
"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": [
diff --git a/fixtures/m_adam_multiple_devices_per_zone/data.json b/fixtures/m_adam_multiple_devices_per_zone/data.json
index 126031795..104ee68ae 100644
--- a/fixtures/m_adam_multiple_devices_per_zone/data.json
+++ b/fixtures/m_adam_multiple_devices_per_zone/data.json
@@ -547,23 +547,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A11"
},
- "e8ef2a01ed3b4139a53bf749204fe6b4": {
- "dev_class": "switching",
- "members": [
- "02cf28bfec924855854c544690a609ef",
- "4a810418d5394b3f82727340b91ba740"
- ],
- "model": "Group",
- "name": "Test",
- "sensors": {
- "electricity_consumed": 14.8,
- "electricity_produced": 0.0
- },
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
"f1fee6043d3642a9b0a65297455f008e": {
"available": true,
"binary_sensors": {
diff --git a/fixtures/stretch_v23/data.json b/fixtures/stretch_v23/data.json
index 5ca04fcd8..2da4cebf7 100644
--- a/fixtures/stretch_v23/data.json
+++ b/fixtures/stretch_v23/data.json
@@ -302,16 +302,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A11"
},
- "f7b145c8492f4dd7a4de760456fdef3e": {
- "dev_class": "switching",
- "members": ["407aa1c1099d463c9137a3a9eda787fd"],
- "model": "Group",
- "name": "Test",
- "switches": {
- "relay": false
- },
- "vendor": "Plugwise"
- },
"fd1b74f59e234a9dae4e23b2b5cf07ed": {
"dev_class": "dryer",
"firmware": "2011-06-27T10:52:18+02:00",
diff --git a/fixtures/stretch_v31/data.json b/fixtures/stretch_v31/data.json
index 9927b5c13..e46b53f7e 100644
--- a/fixtures/stretch_v31/data.json
+++ b/fixtures/stretch_v31/data.json
@@ -85,35 +85,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A04"
},
- "d03738edfcc947f7b8f4573571d90d2d": {
- "dev_class": "switching",
- "members": [
- "059e4d03c7a34d278add5c7a4a781d19",
- "cfe95cf3de1948c0b8955125bf754614"
- ],
- "model": "Group",
- "name": "Schakel",
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
- "d950b314e9d8499f968e6db8d82ef78c": {
- "dev_class": "report",
- "members": [
- "059e4d03c7a34d278add5c7a4a781d19",
- "5871317346d045bc9f6b987ef25ee638",
- "aac7b735042c4832ac9ff33aae4f453b",
- "cfe95cf3de1948c0b8955125bf754614",
- "e1c884e7dede431dadee09506ec4f859"
- ],
- "model": "Group",
- "name": "Stroomvreters",
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
"e1c884e7dede431dadee09506ec4f859": {
"dev_class": "refrigerator",
"firmware": "2011-06-27T10:47:37+02:00",
diff --git a/plugwise/__init__.py b/plugwise/__init__.py
index bf4f3b04b..b99c58888 100644
--- a/plugwise/__init__.py
+++ b/plugwise/__init__.py
@@ -408,9 +408,7 @@ async def set_temperature_offset(self, dev_id: str, offset: float) -> None:
f"Failed to set temperature offset: {str(exc)}"
) from exc # pragma no cover
- async def set_switch_state(
- self, appl_id: str, members: list[str] | None, model: str, state: str
- ) -> bool:
+ async def set_switch_state(self, appl_id: str, model: str, state: str) -> bool:
"""Set the given State of the relevant Switch.
Return the result:
@@ -422,9 +420,7 @@ async def set_switch_state(
raise PlugwiseError("Invalid state supplied to set_switch_state")
try:
- return await self._smile_api.set_switch_state(
- appl_id, members, model, state
- )
+ return await self._smile_api.set_switch_state(appl_id, model, state)
except ConnectionFailedError as exc:
raise ConnectionFailedError(
f"Failed to set switch state: {str(exc)}"
diff --git a/plugwise/common.py b/plugwise/common.py
index 9722975e6..534b5e2ec 100644
--- a/plugwise/common.py
+++ b/plugwise/common.py
@@ -9,11 +9,9 @@
from plugwise.constants import (
ANNA,
- GROUP_TYPES,
NONE,
PRIORITY_DEVICE_CLASSES,
SPECIAL_PLUG_TYPES,
- SWITCH_GROUP_TYPES,
ApplianceType,
GwEntityData,
ModuleData,
@@ -175,23 +173,10 @@ def _reorder_devices(self) -> None:
break
self.gw_entities = {**reordered, **self.gw_entities}
- def _entity_switching_group(self, entity: GwEntityData, data: GwEntityData) -> None:
- """Helper-function for _get_device_zone_data().
-
- Determine switching group device data.
- """
- if entity["dev_class"] in SWITCH_GROUP_TYPES:
- counter = 0
- for member in entity["members"]:
- if self.gw_entities[member]["switches"].get("relay"):
- counter += 1
- data["switches"]["relay"] = counter != 0
- self._count += 1
-
def _get_groups(self) -> dict[str, GwEntityData]:
"""Helper-function for smile.py: get_all_gateway_entities().
- Collect switching-, pumping- or report-group info.
+ Collect info for pumping-group(s).
"""
groups: dict[str, GwEntityData] = {}
# P1 and Anna don't have groups
@@ -199,17 +184,20 @@ def _get_groups(self) -> dict[str, GwEntityData]:
return groups
for group in self._domain_objects.findall("./group"):
- members: list[str] = []
- group_id = group.attrib["id"]
- group_name = group.find("name").text
group_type = group.find("type").text
+ if group_type != "pumping":
+ continue
+
group_appliances = group.findall("appliances/appliance")
+ group_id = group.attrib["id"]
+ group_name = group.find("name").text
+ members: list[str] = []
for item in group_appliances:
# Check if members are not orphaned - stretch
if item.attrib["id"] in self.gw_entities:
members.append(item.attrib["id"])
- if group_type in GROUP_TYPES and members:
+ if members:
groups[group_id] = {
"dev_class": group_type,
"model": "Group",
diff --git a/plugwise/constants.py b/plugwise/constants.py
index 1ddd37c5f..f02bdccd6 100644
--- a/plugwise/constants.py
+++ b/plugwise/constants.py
@@ -304,8 +304,6 @@
]
BINARY_SENSORS: Final[tuple[str, ...]] = get_args(BinarySensorType)
-GROUP_TYPES: Final[tuple[str, ...]] = ("pumping", "report", "switching")
-
SensorType = Literal[
"battery",
"cooling_activation_outdoor_temperature",
@@ -384,8 +382,6 @@
]
SWITCHES: Final[tuple[str, ...]] = get_args(SwitchType)
-SWITCH_GROUP_TYPES: Final[tuple[str, ...]] = ("report", "switching")
-
THERMOSTAT_CLASSES: Final[tuple[str, ...]] = (
"thermostat",
"thermostatic_radiator_valve",
diff --git a/plugwise/data.py b/plugwise/data.py
index 3ab9f53f4..8117543d4 100644
--- a/plugwise/data.py
+++ b/plugwise/data.py
@@ -190,18 +190,16 @@ def _get_entity_data(self, entity_id: str) -> GwEntityData:
data = self._get_measurement_data(entity_id)
# Check availability of wired-connected entities
- # Smartmeter
+ # Smartmeter entity:
self._check_availability(
entity, "smartmeter", data, "P1 does not seem to be connected"
)
- # OpenTherm entity
+ # OpenTherm entity:
if entity["name"] != "OnOff":
self._check_availability(
entity, "heater_central", data, "no OpenTherm communication"
)
- # Switching groups data
- self._entity_switching_group(entity, data)
# Adam data
if self.check_name(ADAM):
self._get_adam_data(entity, data)
diff --git a/plugwise/legacy/data.py b/plugwise/legacy/data.py
index c5cde29a7..7a3800648 100644
--- a/plugwise/legacy/data.py
+++ b/plugwise/legacy/data.py
@@ -40,9 +40,6 @@ def _get_entity_data(self, entity_id: str) -> GwEntityData:
entity = self.gw_entities[entity_id]
data = self._get_measurement_data(entity_id)
- # Switching groups data
- self._entity_switching_group(entity, data)
-
# Skip obtaining data when not a thermostat
if entity["dev_class"] != "thermostat":
return data
diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py
index 54a21c15d..e63c8989e 100644
--- a/plugwise/legacy/smile.py
+++ b/plugwise/legacy/smile.py
@@ -78,13 +78,9 @@ def get_all_gateway_entities(self) -> None:
"""Collect the Plugwise gateway entities and their data and states from the received raw XML-data.
First, collect all the connected entities and their initial data.
- Collect and add switching- and/or pump-group entities.
Finally, collect the data and states for each entity.
"""
self._all_appliances()
- if group_data := self._get_groups():
- self.gw_entities.update(group_data)
-
self._all_entity_data()
async def async_update(self) -> dict[str, GwEntityData]:
@@ -219,13 +215,10 @@ async def set_schedule_state(
uri = f"{RULES};id={schedule_rule_id}"
await self.call_request(uri, method="put", data=data)
- async def set_switch_state(
- self, appl_id: str, members: list[str] | None, model: str, state: str
- ) -> bool:
+ async def set_switch_state(self, appl_id: str, model: str, state: str) -> bool:
"""Set the given state of the relevant switch.
For individual switches, sets the state directly.
- For group switches, sets the state for each member in the group separately.
For switch-locks, sets the lock state using a different data format.
Return the requested state when succesful, the current state otherwise.
"""
@@ -261,14 +254,8 @@ async def set_switch_state(
await self.call_request(APPLIANCES, method="post", data=data)
return requested_state
- # Handle group of switches
- data = f"<{switch.func_type}>{state}{switch.func_type}>"
- if members is not None:
- return await self._set_groupswitch_member_state(
- appl_id, data, members, state, switch
- )
-
# Handle individual relay switches
+ data = f"<{switch.func_type}>{state}{switch.func_type}>"
uri = f"{APPLIANCES};id={appl_id}/relay"
if model == "relay" and self.gw_entities[appl_id]["switches"]["lock"]:
# Don't bother switching a relay when the corresponding lock-state is true
@@ -277,28 +264,6 @@ async def set_switch_state(
await self.call_request(uri, method="put", data=data)
return requested_state
- async def _set_groupswitch_member_state(
- self, appl_id: str, data: str, members: list[str], state: str, switch: Munch
- ) -> bool:
- """Helper-function for set_switch_state().
-
- Set the requested state of the relevant switch within a group of switches.
- Return the current group-state when none of the switches has changed its state, the requested state otherwise.
- """
- current_state = self.gw_entities[appl_id]["switches"]["relay"]
- requested_state = state == STATE_ON
- switched = 0
- for member in members:
- if not self.gw_entities[member]["switches"]["lock"]:
- uri = f"{APPLIANCES};id={member}/relay"
- await self.call_request(uri, method="put", data=data)
- switched += 1
-
- if switched > 0:
- return requested_state
-
- return current_state # pragma: no cover
-
async def set_temperature(self, _: str, items: dict[str, float]) -> None:
"""Set the given Temperature on the relevant Thermostat."""
setpoint: float | None = None
diff --git a/plugwise/smile.py b/plugwise/smile.py
index 22010af5c..6d4b3a718 100644
--- a/plugwise/smile.py
+++ b/plugwise/smile.py
@@ -104,7 +104,7 @@ def get_all_gateway_entities(self) -> None:
First, collect all the connected entities and their initial data.
If a thermostat-gateway, collect a list of thermostats with offset-capability.
- Collect and add switching- and/or pump-group entities.
+ Collect and add pumping-group entities.
Finally, collect the data and states for each entity.
"""
self._all_appliances()
@@ -393,13 +393,10 @@ def determine_contexts(self, loc_id: str, state: str, sched_id: str) -> str:
return str(etree.tostring(contexts, encoding="unicode").rstrip())
- async def set_switch_state(
- self, appl_id: str, members: list[str] | None, model: str, state: str
- ) -> bool:
+ async def set_switch_state(self, appl_id: str, model: str, state: str) -> bool:
"""Set the given state of the relevant Switch.
For individual switches, sets the state directly.
- For group switches, sets the state for each member in the group separately.
For switch-locks, sets the lock state using a different data format.
Return the requested state when succesful, the current state otherwise.
"""
@@ -418,11 +415,6 @@ async def set_switch_state(
f"{switch.func_type}>"
)
- if members is not None:
- return await self._set_groupswitch_member_state(
- appl_id, data, members, state, switch
- )
-
locator = f'appliance[@id="{appl_id}"]/{switch.actuator}/{switch.func_type}'
found = self._domain_objects.findall(locator)
for item in found:
@@ -445,32 +437,6 @@ async def set_switch_state(
await self.call_request(uri, method="put", data=data)
return requested_state
- async def _set_groupswitch_member_state(
- self, appl_id: str, data: str, members: list[str], state: str, switch: Munch
- ) -> bool:
- """Helper-function for set_switch_state().
-
- Set the requested state of the relevant switch within a group of switches.
- Return the current group-state when none of the switches has changed its state, the requested state otherwise.
- """
- current_state = self.gw_entities[appl_id]["switches"]["relay"]
- requested_state = state == STATE_ON
- switched = 0
- for member in members:
- locator = f'appliance[@id="{member}"]/{switch.actuator}/{switch.func_type}'
- switch_id = self._domain_objects.find(locator).attrib["id"]
- uri = f"{APPLIANCES};id={member}/{switch.device};id={switch_id}"
- lock_blocked = self.gw_entities[member]["switches"].get("lock")
- # Assume Plugs under Plugwise control are not part of a group
- if lock_blocked is not None and not lock_blocked:
- await self.call_request(uri, method="put", data=data)
- switched += 1
-
- if switched > 0:
- return requested_state
-
- return current_state
-
async def set_temperature(self, loc_id: str, items: dict[str, float]) -> None:
"""Set the given Temperature on the relevant Thermostat."""
setpoint: float | None = None
diff --git a/tests/data/adam/adam_multiple_devices_per_zone.json b/tests/data/adam/adam_multiple_devices_per_zone.json
index 364d71e59..56329565a 100644
--- a/tests/data/adam/adam_multiple_devices_per_zone.json
+++ b/tests/data/adam/adam_multiple_devices_per_zone.json
@@ -554,23 +554,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A11"
},
- "e8ef2a01ed3b4139a53bf749204fe6b4": {
- "dev_class": "switching",
- "members": [
- "02cf28bfec924855854c544690a609ef",
- "4a810418d5394b3f82727340b91ba740"
- ],
- "model": "Group",
- "name": "Test",
- "sensors": {
- "electricity_consumed": 14.8,
- "electricity_produced": 0.0
- },
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
"f1fee6043d3642a9b0a65297455f008e": {
"available": true,
"binary_sensors": {
diff --git a/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json
index afa38abd8..15f7e42ab 100644
--- a/tests/data/adam/adam_plus_anna_new.json
+++ b/tests/data/adam/adam_plus_anna_new.json
@@ -266,23 +266,6 @@
"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": [
diff --git a/tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json b/tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json
index 65bbf87d9..1b92eb631 100644
--- a/tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json
+++ b/tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json
@@ -32,14 +32,5 @@
"binary_sensors": {
"plugwise_notification": true
}
- },
- "e8ef2a01ed3b4139a53bf749204fe6b4": {
- "members": [
- "2568cc4b9c1e401495d4741a5f89bee1",
- "29542b2b6a6a4169acecc15c72a599b8"
- ],
- "switches": {
- "relay": false
- }
}
}
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 10cd1add3..4485173e4 100644
--- a/tests/data/adam/adam_plus_anna_new_regulation_off.json
+++ b/tests/data/adam/adam_plus_anna_new_regulation_off.json
@@ -214,19 +214,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "000D6F000C869B61"
},
- "e8ef2a01ed3b4139a53bf749204fe6b4": {
- "dev_class": "switching",
- "members": [
- "2568cc4b9c1e401495d4741a5f89bee1",
- "29542b2b6a6a4169acecc15c72a599b8"
- ],
- "model": "Group",
- "name": "Test",
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
"f2bf9048bef64cc5b6d5110154e33c81": {
"active_preset": "home",
"available_schedules": [
diff --git a/tests/data/stretch/stretch_v23.json b/tests/data/stretch/stretch_v23.json
index 5ca04fcd8..2da4cebf7 100644
--- a/tests/data/stretch/stretch_v23.json
+++ b/tests/data/stretch/stretch_v23.json
@@ -302,16 +302,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A11"
},
- "f7b145c8492f4dd7a4de760456fdef3e": {
- "dev_class": "switching",
- "members": ["407aa1c1099d463c9137a3a9eda787fd"],
- "model": "Group",
- "name": "Test",
- "switches": {
- "relay": false
- },
- "vendor": "Plugwise"
- },
"fd1b74f59e234a9dae4e23b2b5cf07ed": {
"dev_class": "dryer",
"firmware": "2011-06-27T10:52:18+02:00",
diff --git a/tests/data/stretch/stretch_v31.json b/tests/data/stretch/stretch_v31.json
index 9927b5c13..e46b53f7e 100644
--- a/tests/data/stretch/stretch_v31.json
+++ b/tests/data/stretch/stretch_v31.json
@@ -85,35 +85,6 @@
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A04"
},
- "d03738edfcc947f7b8f4573571d90d2d": {
- "dev_class": "switching",
- "members": [
- "059e4d03c7a34d278add5c7a4a781d19",
- "cfe95cf3de1948c0b8955125bf754614"
- ],
- "model": "Group",
- "name": "Schakel",
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
- "d950b314e9d8499f968e6db8d82ef78c": {
- "dev_class": "report",
- "members": [
- "059e4d03c7a34d278add5c7a4a781d19",
- "5871317346d045bc9f6b987ef25ee638",
- "aac7b735042c4832ac9ff33aae4f453b",
- "cfe95cf3de1948c0b8955125bf754614",
- "e1c884e7dede431dadee09506ec4f859"
- ],
- "model": "Group",
- "name": "Stroomvreters",
- "switches": {
- "relay": true
- },
- "vendor": "Plugwise"
- },
"e1c884e7dede431dadee09506ec4f859": {
"dev_class": "refrigerator",
"firmware": "2011-06-27T10:47:37+02:00",
diff --git a/tests/data/stretch/stretch_v31_UPDATED_DATA.json b/tests/data/stretch/stretch_v31_UPDATED_DATA.json
index 44a1049ef..8381af99c 100644
--- a/tests/data/stretch/stretch_v31_UPDATED_DATA.json
+++ b/tests/data/stretch/stretch_v31_UPDATED_DATA.json
@@ -31,14 +31,5 @@
"relay": false,
"lock": false
}
- },
- "d03738edfcc947f7b8f4573571d90d2d": {
- "members": [
- "059e4d03c7a34d278add5c7a4a781d19",
- "cfe95cf3de1948c0b8955125bf754614"
- ],
- "switches": {
- "relay": false
- }
}
}
diff --git a/tests/test_adam.py b/tests/test_adam.py
index 8484d56d7..73c9940a0 100644
--- a/tests/test_adam.py
+++ b/tests/test_adam.py
@@ -34,7 +34,7 @@ async def test_connect_adam_plus_anna_new(self):
test_items = await self.device_test(api, "2025-10-12 00:00:01", testdata)
assert api.gateway_id == "da224107914542988a88561b4452b0f6"
- assert self.entity_items == 230
+ assert self.entity_items == 222
assert test_items == self.entity_items
assert self.entity_list == [
"da224107914542988a88561b4452b0f6",
@@ -50,7 +50,6 @@ async def test_connect_adam_plus_anna_new(self):
"14df5c4dc8cb4ba69f9d1ac0eaf7c5c6",
"da575e9e09b947e281fb6e3ebce3b174",
"c9293d1d68ee48fc8843c6f0dee2b6be",
- "e8ef2a01ed3b4139a53bf749204fe6b4",
"f2bf9048bef64cc5b6d5110154e33c81",
"f871b8c4d63549319221e294e4f88074",
]
@@ -96,12 +95,6 @@ async def test_connect_adam_plus_anna_new(self):
)
assert result_1 and result_2
- switch_change = await self.tinker_switch(
- api,
- "e8ef2a01ed3b4139a53bf749204fe6b4",
- ["2568cc4b9c1e401495d4741a5f89bee1", "29542b2b6a6a4169acecc15c72a599b8"],
- )
- assert switch_change
switch_change = await self.tinker_switch(
api,
"056ee145a816487eaa69243c3280f8bf",
@@ -302,7 +295,7 @@ async def test_connect_adam_multiple_devices_per_zone(self):
)
test_items = await self.device_test(api, "2022-05-16 00:00:01", testdata)
- assert self.entity_items == 394
+ assert self.entity_items == 386
assert test_items == self.entity_items
assert "af82e4ccf9c548528166d38e560662a4" in self.notifications
@@ -319,13 +312,6 @@ async def test_connect_adam_multiple_devices_per_zone(self):
api, "675416a629f343c495449970e2ca37b5"
)
assert not switch_change
- # Test a blocked group-change, both relays are locked.
- group_change = await self.tinker_switch(
- api,
- "e8ef2a01ed3b4139a53bf749204fe6b4",
- ["02cf28bfec924855854c544690a609ef", "4a810418d5394b3f82727340b91ba740"],
- )
- assert not group_change
await api.close_connection()
await self.disconnect(server, client)
diff --git a/tests/test_init.py b/tests/test_init.py
index 1f8f3c803..0b08dbb2a 100644
--- a/tests/test_init.py
+++ b/tests/test_init.py
@@ -621,9 +621,7 @@ async def tinker_reboot(self, api, unhappy=False):
return False
@pytest.mark.asyncio
- async def tinker_switch(
- self, api, dev_id=None, members=None, model="relay", unhappy=False
- ):
+ async def tinker_switch(self, api, dev_id=None, model="relay", unhappy=False):
"""Turn a Switch on and off to test functionality."""
_LOGGER.info("Asserting modifying settings for switch devices:")
_LOGGER.info("- Devices (%s):", dev_id)
@@ -632,7 +630,7 @@ async def tinker_switch(
for new_state in ["off", "on", "off"]:
_LOGGER.info("- Switching %s", new_state)
try:
- result = await api.set_switch_state(dev_id, members, model, new_state)
+ result = await api.set_switch_state(dev_id, model, new_state)
if result == convert[new_state]:
tinker_switch_passed = True
_LOGGER.info(" + tinker_switch worked as intended")
@@ -653,14 +651,14 @@ async def tinker_switch(
@pytest.mark.asyncio
async def tinker_switch_bad_input(
- self, api, dev_id=None, members=None, model="relay", unhappy=False
+ self, api, dev_id=None, model="relay", unhappy=False
):
"""Enter a wrong state as input to toggle a Switch."""
_LOGGER.info("Test entering bad input set_switch_state:")
_LOGGER.info("- Devices (%s):", dev_id)
new_state = "false"
try:
- await api.set_switch_state(dev_id, members, model, new_state)
+ await api.set_switch_state(dev_id, model, new_state)
except pw_exceptions.PlugwiseError:
_LOGGER.info(" + failed input-check as expected")
return True # test is pass!
diff --git a/tests/test_legacy_stretch.py b/tests/test_legacy_stretch.py
index 764453162..e8b2c97ec 100644
--- a/tests/test_legacy_stretch.py
+++ b/tests/test_legacy_stretch.py
@@ -29,7 +29,7 @@ async def test_connect_stretch_v31(self):
await self.device_test(api, "2022-05-16 00:00:01", testdata)
assert api.gateway_id == "0000aaaa0000aaaa0000aaaa0000aa00"
- assert self.entity_items == 85
+ assert self.entity_items == 73
switch_change = await self.tinker_switch(
api,
@@ -68,7 +68,7 @@ async def test_connect_stretch_v23(self):
)
await self.device_test(api, "2022-05-16 00:00:01", testdata)
- assert self.entity_items == 244
+ assert self.entity_items == 238
switch_change = await self.tinker_switch(
api, "2587a7fcdd7e482dab03fda256076b4b"
@@ -78,12 +78,6 @@ async def test_connect_stretch_v23(self):
api, "2587a7fcdd7e482dab03fda256076b4b", model="lock"
)
assert switch_change
- switch_change = await self.tinker_switch(
- api,
- "f7b145c8492f4dd7a4de760456fdef3e",
- ["407aa1c1099d463c9137a3a9eda787fd"],
- )
- assert switch_change
await api.close_connection()
await self.disconnect(server, client)