Skip to content

Commit 088cde8

Browse files
committed
Save various updates
1 parent 627958c commit 088cde8

File tree

4 files changed

+61
-4
lines changed

4 files changed

+61
-4
lines changed

fixtures/m_adam_cooling/data.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,21 @@
9191
},
9292
"vendor": "Plugwise"
9393
},
94+
"c9293d1d68ee48fc8843c6f0dee2b6be": {
95+
"dev_class": "pumping",
96+
"members": [
97+
"854f8a9b0e7e425db97f1f110e1ce4b3",
98+
"ad4838d7d35c4d6ea796ee12ae5aedf8"
99+
],
100+
"model": "Group",
101+
"name": "Vloerverwarming",
102+
"sensors": {
103+
"electricity_consumed": 45.0,
104+
"electricity_produced": 0.0,
105+
"temperature": 20.1
106+
},
107+
"vendor": "Plugwise"
108+
},
94109
"da224107914542988a88561b4452b0f6": {
95110
"binary_sensors": {
96111
"plugwise_notification": false
@@ -173,8 +188,12 @@
173188
"2568cc4b9c1e401495d4741a5f89bee1",
174189
"29542b2b6a6a4169acecc15c72a599b8"
175190
],
176-
"model": "Switchgroup",
191+
"model": "Group",
177192
"name": "Test",
193+
"sensors": {
194+
"electricity_consumed": 16.5,
195+
"electricity_produced": 0.0
196+
},
178197
"switches": {
179198
"relay": true
180199
},

fixtures/m_adam_heating/data.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@
9696
},
9797
"vendor": "Plugwise"
9898
},
99+
"c9293d1d68ee48fc8843c6f0dee2b6be": {
100+
"dev_class": "pumping",
101+
"members": [
102+
"854f8a9b0e7e425db97f1f110e1ce4b3",
103+
"ad4838d7d35c4d6ea796ee12ae5aedf8"
104+
],
105+
"model": "Group",
106+
"name": "Vloerverwarming",
107+
"sensors": {
108+
"electricity_consumed": 45.0,
109+
"electricity_produced": 0.0,
110+
"temperature": 20.1
111+
},
112+
"vendor": "Plugwise"
113+
},
99114
"da224107914542988a88561b4452b0f6": {
100115
"binary_sensors": {
101116
"plugwise_notification": false
@@ -172,8 +187,12 @@
172187
"2568cc4b9c1e401495d4741a5f89bee1",
173188
"29542b2b6a6a4169acecc15c72a599b8"
174189
],
175-
"model": "Switchgroup",
190+
"model": "Group",
176191
"name": "Test",
192+
"sensors": {
193+
"electricity_consumed": 16.5,
194+
"electricity_produced": 0.0
195+
},
177196
"switches": {
178197
"relay": true
179198
},

fixtures/m_adam_multiple_devices_per_zone/data.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,19 @@
505505
"vendor": "Plugwise",
506506
"zigbee_mac_address": "ABCD012345670A06"
507507
},
508+
"e117db6848394c8cb70d9c28e63d92d2": {
509+
"dev_class": "pumping",
510+
"members": [
511+
"78d1126fc4c743db81b61c20e88342a7",
512+
"b59bcebaf94b499ea7d46e4a66fb62d8"
513+
],
514+
"model": "Group",
515+
"name": "Vloerverwarming Woonkamer",
516+
"sensors": {
517+
"electricity_consumed": 35.6
518+
},
519+
"vendor": "Plugwise"
520+
},
508521
"e7693eb9582644e5b865dba8d4447cf1": {
509522
"available": true,
510523
"binary_sensors": {
@@ -539,8 +552,12 @@
539552
"02cf28bfec924855854c544690a609ef",
540553
"4a810418d5394b3f82727340b91ba740"
541554
],
542-
"model": "Switchgroup",
555+
"model": "Group",
543556
"name": "Test",
557+
"sensors": {
558+
"electricity_consumed": 14.8,
559+
"electricity_produced": 0.0
560+
},
544561
"switches": {
545562
"relay": true
546563
},

plugwise/helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ def _collect_group_sensors(
382382
measurements: dict[str, UOM],
383383
) -> None:
384384
"""Collect group sensors."""
385-
if (group := self._domain_objects.find(f'./group[@id="{entity_id}"]')) is not None:
385+
if (
386+
group := self._domain_objects.find(f'./group[@id="{entity_id}"]')
387+
) is not None:
386388
for measurement, attrs in measurements.items():
387389
locator = f'.//logs/point_log[type="{measurement}"]/period/measurement'
388390
if (group_meas_loc := group.find(locator)) is None:

0 commit comments

Comments
 (0)