Skip to content

Commit abde458

Browse files
committed
Move _reorder_devices() to common.py
1 parent c4fab17 commit abde458

File tree

17 files changed

+475
-106
lines changed

17 files changed

+475
-106
lines changed

fixtures/adam_heatpump_cooling/data.json

Lines changed: 105 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
"dev_class": "climate",
1313
"model": "ThermoZone",
1414
"name": "Slaapkamer SJ",
15-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
15+
"preset_modes": [
16+
"no_frost",
17+
"vacation",
18+
"away",
19+
"home",
20+
"asleep"
21+
],
1622
"select_schedule": "off",
1723
"sensors": {
1824
"electricity_consumed": 0.0,
@@ -26,7 +32,9 @@
2632
"upper_bound": 99.9
2733
},
2834
"thermostats": {
29-
"primary": ["d3a276aeb3114a509bab1e4bf8c40348"],
35+
"primary": [
36+
"d3a276aeb3114a509bab1e4bf8c40348"
37+
],
3038
"secondary": []
3139
},
3240
"vendor": "Plugwise"
@@ -130,7 +138,13 @@
130138
"dev_class": "climate",
131139
"model": "ThermoZone",
132140
"name": "Slaapkamer DB",
133-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
141+
"preset_modes": [
142+
"no_frost",
143+
"vacation",
144+
"away",
145+
"home",
146+
"asleep"
147+
],
134148
"select_schedule": "off",
135149
"sensors": {
136150
"electricity_consumed": 0.0,
@@ -144,7 +158,9 @@
144158
"upper_bound": 99.9
145159
},
146160
"thermostats": {
147-
"primary": ["47e2c550a33846b680725aa3fb229473"],
161+
"primary": [
162+
"47e2c550a33846b680725aa3fb229473"
163+
],
148164
"secondary": []
149165
},
150166
"vendor": "Plugwise"
@@ -244,7 +260,13 @@
244260
"dev_class": "climate",
245261
"model": "ThermoZone",
246262
"name": "Badkamer 2",
247-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
263+
"preset_modes": [
264+
"no_frost",
265+
"vacation",
266+
"away",
267+
"home",
268+
"asleep"
269+
],
248270
"select_schedule": "Werkdag schema",
249271
"sensors": {
250272
"electricity_consumed": 0.0,
@@ -257,7 +279,9 @@
257279
"upper_bound": 99.9
258280
},
259281
"thermostats": {
260-
"primary": ["f04c985c11ad4848b8fcd710343f9dcf"],
282+
"primary": [
283+
"f04c985c11ad4848b8fcd710343f9dcf"
284+
],
261285
"secondary": []
262286
},
263287
"vendor": "Plugwise"
@@ -288,7 +312,11 @@
288312
},
289313
"dev_class": "gateway",
290314
"firmware": "3.2.8",
291-
"gateway_modes": ["away", "full", "vacation"],
315+
"gateway_modes": [
316+
"away",
317+
"full",
318+
"vacation"
319+
],
292320
"hardware": "AME Smile 2.0 board",
293321
"location": "eedadcb297564f1483faa509179aebed",
294322
"mac_address": "012345670001",
@@ -386,7 +414,13 @@
386414
"dev_class": "climate",
387415
"model": "ThermoZone",
388416
"name": "Badkamer 1",
389-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
417+
"preset_modes": [
418+
"no_frost",
419+
"vacation",
420+
"away",
421+
"home",
422+
"asleep"
423+
],
390424
"select_schedule": "Werkdag schema",
391425
"sensors": {
392426
"electricity_consumed": 0.0,
@@ -400,7 +434,9 @@
400434
"upper_bound": 99.9
401435
},
402436
"thermostats": {
403-
"primary": ["eac5db95d97241f6b17790897847ccf5"],
437+
"primary": [
438+
"eac5db95d97241f6b17790897847ccf5"
439+
],
404440
"secondary": []
405441
},
406442
"vendor": "Plugwise"
@@ -418,7 +454,13 @@
418454
"dev_class": "climate",
419455
"model": "ThermoZone",
420456
"name": "Slaapkamer RB",
421-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
457+
"preset_modes": [
458+
"no_frost",
459+
"vacation",
460+
"away",
461+
"home",
462+
"asleep"
463+
],
422464
"select_schedule": "off",
423465
"sensors": {
424466
"electricity_consumed": 3.13,
@@ -431,7 +473,9 @@
431473
"upper_bound": 99.9
432474
},
433475
"thermostats": {
434-
"primary": ["c4ed311d54e341f58b4cdd201d1fde7e"],
476+
"primary": [
477+
"c4ed311d54e341f58b4cdd201d1fde7e"
478+
],
435479
"secondary": []
436480
},
437481
"vendor": "Plugwise"
@@ -469,7 +513,13 @@
469513
"dev_class": "climate",
470514
"model": "ThermoZone",
471515
"name": "Slaapkamer SQ",
472-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
516+
"preset_modes": [
517+
"no_frost",
518+
"vacation",
519+
"away",
520+
"home",
521+
"asleep"
522+
],
473523
"select_schedule": "off",
474524
"sensors": {
475525
"electricity_consumed": 0.0,
@@ -483,7 +533,9 @@
483533
"upper_bound": 99.9
484534
},
485535
"thermostats": {
486-
"primary": ["beb32da072274e698146db8b022f3c36"],
536+
"primary": [
537+
"beb32da072274e698146db8b022f3c36"
538+
],
487539
"secondary": []
488540
},
489541
"vendor": "Plugwise"
@@ -521,7 +573,13 @@
521573
"dev_class": "climate",
522574
"model": "ThermoZone",
523575
"name": "Keuken",
524-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
576+
"preset_modes": [
577+
"no_frost",
578+
"vacation",
579+
"away",
580+
"home",
581+
"asleep"
582+
],
525583
"select_schedule": "Werkdag schema",
526584
"sensors": {
527585
"electricity_consumed": 2.13,
@@ -535,7 +593,9 @@
535593
"upper_bound": 99.9
536594
},
537595
"thermostats": {
538-
"primary": ["ea8372c0e3ad4622ad45a041d02425f5"],
596+
"primary": [
597+
"ea8372c0e3ad4622ad45a041d02425f5"
598+
],
539599
"secondary": []
540600
},
541601
"vendor": "Plugwise"
@@ -553,7 +613,13 @@
553613
"dev_class": "climate",
554614
"model": "ThermoZone",
555615
"name": "Bijkeuken",
556-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
616+
"preset_modes": [
617+
"no_frost",
618+
"vacation",
619+
"away",
620+
"home",
621+
"asleep"
622+
],
557623
"select_schedule": "off",
558624
"sensors": {
559625
"electricity_consumed": 0.0,
@@ -567,7 +633,9 @@
567633
"upper_bound": 99.9
568634
},
569635
"thermostats": {
570-
"primary": ["1053c8bbf8be43c6921742b146a625f1"],
636+
"primary": [
637+
"1053c8bbf8be43c6921742b146a625f1"
638+
],
571639
"secondary": []
572640
},
573641
"vendor": "Plugwise"
@@ -683,7 +751,13 @@
683751
"dev_class": "climate",
684752
"model": "ThermoZone",
685753
"name": "Slaapkamer JM",
686-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
754+
"preset_modes": [
755+
"no_frost",
756+
"vacation",
757+
"away",
758+
"home",
759+
"asleep"
760+
],
687761
"select_schedule": "off",
688762
"sensors": {
689763
"electricity_consumed": 0.0,
@@ -697,7 +771,9 @@
697771
"upper_bound": 99.9
698772
},
699773
"thermostats": {
700-
"primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"],
774+
"primary": [
775+
"7fda9f84f01342f8afe9ebbbbff30c0f"
776+
],
701777
"secondary": []
702778
},
703779
"vendor": "Plugwise"
@@ -785,7 +861,13 @@
785861
"dev_class": "climate",
786862
"model": "ThermoZone",
787863
"name": "Woonkamer",
788-
"preset_modes": ["no_frost", "vacation", "away", "home", "asleep"],
864+
"preset_modes": [
865+
"no_frost",
866+
"vacation",
867+
"away",
868+
"home",
869+
"asleep"
870+
],
789871
"select_schedule": "Werkdag schema",
790872
"sensors": {
791873
"electricity_consumed": 0.0,
@@ -799,7 +881,9 @@
799881
"upper_bound": 35.0
800882
},
801883
"thermostats": {
802-
"primary": ["ca79d23ae0094120b877558734cff85c"],
884+
"primary": [
885+
"ca79d23ae0094120b877558734cff85c"
886+
],
803887
"secondary": []
804888
},
805889
"vendor": "Plugwise"

0 commit comments

Comments
 (0)