Skip to content

Commit 8182e8c

Browse files
authored
Merge pull request #828 from plugwise/improve_group
Improve/extend processing of Groups
2 parents b13f7da + dd598d2 commit 8182e8c

File tree

24 files changed

+260
-31
lines changed

24 files changed

+260
-31
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v1.11.0
4+
5+
- Extend feature: support pumping group, add group sensors
6+
37
## v1.10.0
48

59
- New feature: implement setting Adam zone profile via PR [#814](https://github.com/plugwise/python-plugwise/pull/814)

biome.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files": {
3+
"maxSize": 5000000
4+
}
5+
}

fixtures/adam_multiple_devices_per_zone/data.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,20 @@
512512
"vendor": "Plugwise",
513513
"zigbee_mac_address": "ABCD012345670A06"
514514
},
515+
"e117db6848394c8cb70d9c28e63d92d2": {
516+
"dev_class": "pumping",
517+
"members": [
518+
"78d1126fc4c743db81b61c20e88342a7",
519+
"b59bcebaf94b499ea7d46e4a66fb62d8"
520+
],
521+
"model": "Group",
522+
"name": "Vloerverwarming Woonkamer",
523+
"sensors": {
524+
"electricity_consumed": 35.6,
525+
"temperature": 20.9
526+
},
527+
"vendor": "Plugwise"
528+
},
515529
"e7693eb9582644e5b865dba8d4447cf1": {
516530
"available": true,
517531
"binary_sensors": {
@@ -546,8 +560,12 @@
546560
"02cf28bfec924855854c544690a609ef",
547561
"4a810418d5394b3f82727340b91ba740"
548562
],
549-
"model": "Switchgroup",
563+
"model": "Group",
550564
"name": "Test",
565+
"sensors": {
566+
"electricity_consumed": 14.8,
567+
"electricity_produced": 0.0
568+
},
551569
"switches": {
552570
"relay": true
553571
},

fixtures/adam_plus_anna_new/data.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,21 @@
181181
},
182182
"vendor": "Plugwise"
183183
},
184+
"c9293d1d68ee48fc8843c6f0dee2b6be": {
185+
"dev_class": "pumping",
186+
"members": [
187+
"854f8a9b0e7e425db97f1f110e1ce4b3",
188+
"ad4838d7d35c4d6ea796ee12ae5aedf8"
189+
],
190+
"model": "Group",
191+
"name": "Vloerverwarming",
192+
"sensors": {
193+
"electricity_consumed": 45.0,
194+
"electricity_produced": 0.0,
195+
"temperature": 20.1
196+
},
197+
"vendor": "Plugwise"
198+
},
184199
"da224107914542988a88561b4452b0f6": {
185200
"binary_sensors": {
186201
"plugwise_notification": false
@@ -257,8 +272,12 @@
257272
"2568cc4b9c1e401495d4741a5f89bee1",
258273
"29542b2b6a6a4169acecc15c72a599b8"
259274
],
260-
"model": "Switchgroup",
275+
"model": "Group",
261276
"name": "Test",
277+
"sensors": {
278+
"electricity_consumed": 16.5,
279+
"electricity_produced": 0.0
280+
},
262281
"switches": {
263282
"relay": true
264283
},

fixtures/adam_plus_anna_new_regulation_off/data.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,21 @@
155155
},
156156
"vendor": "Plugwise"
157157
},
158+
"c9293d1d68ee48fc8843c6f0dee2b6be": {
159+
"dev_class": "pumping",
160+
"members": [
161+
"854f8a9b0e7e425db97f1f110e1ce4b3",
162+
"ad4838d7d35c4d6ea796ee12ae5aedf8"
163+
],
164+
"model": "Group",
165+
"name": "Vloerverwarming",
166+
"sensors": {
167+
"electricity_consumed": 43.8,
168+
"electricity_produced": 0.0,
169+
"temperature": 18.4
170+
},
171+
"vendor": "Plugwise"
172+
},
158173
"da224107914542988a88561b4452b0f6": {
159174
"binary_sensors": {
160175
"plugwise_notification": false
@@ -210,8 +225,12 @@
210225
"2568cc4b9c1e401495d4741a5f89bee1",
211226
"29542b2b6a6a4169acecc15c72a599b8"
212227
],
213-
"model": "Switchgroup",
228+
"model": "Group",
214229
"name": "Test",
230+
"sensors": {
231+
"electricity_consumed": 14.8,
232+
"electricity_produced": 0.0
233+
},
215234
"switches": {
216235
"relay": true
217236
},

fixtures/adam_zone_per_device/data.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,20 @@
509509
"vendor": "Plugwise",
510510
"zigbee_mac_address": "ABCD012345670A06"
511511
},
512+
"e117db6848394c8cb70d9c28e63d92d2": {
513+
"dev_class": "pumping",
514+
"members": [
515+
"78d1126fc4c743db81b61c20e88342a7",
516+
"b59bcebaf94b499ea7d46e4a66fb62d8"
517+
],
518+
"model": "Group",
519+
"name": "Vloerverwarming Woonkamer",
520+
"sensors": {
521+
"electricity_consumed": 35.8,
522+
"temperature": 21.1
523+
},
524+
"vendor": "Plugwise"
525+
},
512526
"e7693eb9582644e5b865dba8d4447cf1": {
513527
"available": true,
514528
"binary_sensors": {

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: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,20 @@
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+
"temperature": 20.9
519+
},
520+
"vendor": "Plugwise"
521+
},
508522
"e7693eb9582644e5b865dba8d4447cf1": {
509523
"available": true,
510524
"binary_sensors": {
@@ -539,8 +553,12 @@
539553
"02cf28bfec924855854c544690a609ef",
540554
"4a810418d5394b3f82727340b91ba740"
541555
],
542-
"model": "Switchgroup",
556+
"model": "Group",
543557
"name": "Test",
558+
"sensors": {
559+
"electricity_consumed": 14.8,
560+
"electricity_produced": 0.0
561+
},
544562
"switches": {
545563
"relay": true
546564
},

fixtures/stretch_v23/data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
"f7b145c8492f4dd7a4de760456fdef3e": {
306306
"dev_class": "switching",
307307
"members": ["407aa1c1099d463c9137a3a9eda787fd"],
308-
"model": "Switchgroup",
308+
"model": "Group",
309309
"name": "Test",
310310
"switches": {
311311
"relay": false

0 commit comments

Comments
 (0)