We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd671b7 commit fec7b38Copy full SHA for fec7b38
plugwise/helper.py
@@ -568,8 +568,14 @@ def appliance_data(self, dev_id):
568
569
data[name] = format_measure(measure, ENERGY_WATT_HOUR)
570
571
+ # Adam & Stretches: detect relay switch data
572
+ actuator = "actuator_functionalities"
573
+ func_type = "relay_functionality"
574
+ if self.smile_type == "stretch" and self.smile_version[1].major == 2:
575
+ actuator = "actuators"
576
+ func_type = "relay"
577
for item, name in {"lock": "lock", "state": "relay"}.items():
- locator = f'.//actuator_functionalities/relay_functionality/{item}'
578
+ locator = f'.//{actuator}/{func_type}/{item}'
579
if appliance.find(locator) is not None:
580
measure = appliance.find(locator).text
581
data[name] = measure
0 commit comments