Skip to content

Commit 71df2e3

Browse files
authored
Merge pull request #771 from plugwise/fix-avail-schedules
Implement fixes related to the select-platform-data provided to the HA Core integrations, part of solving pw-beta issue #897
2 parents e8be5d9 + a3297f3 commit 71df2e3

File tree

19 files changed

+48
-31
lines changed

19 files changed

+48
-31
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Changelog
22

3-
## Ongoing / 1.7.8a0+1
3+
## v1.7.8
44

5-
- Chores move module publishing on (test)pypi to Trusted Publishing (and using uv) - released as alpha 1.7.8a0+1 to demonstrate functionality
5+
- Implement fixes related to the select-platform-data provided to the HA Core integrations, part of solving pw-beta issue [#897](https://github.com/plugwise/plugwise-beta/issues/897)
6+
- Chores move module publishing on (test)pypi to Trusted Publishing (and using uv)
67

78
## v1.7.7
89

fixtures/adam_jip/data.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"06aecb3d00354375924f50c47af36bd2": {
33
"active_preset": "no_frost",
4+
"available_schedules": [],
45
"climate_mode": "heat",
56
"control_state": "idle",
67
"dev_class": "climate",
78
"model": "ThermoZone",
89
"name": "Slaapkamer",
910
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
11+
"select_schedule": null,
1012
"sensors": {
1113
"temperature": 24.2
1214
},
@@ -24,12 +26,14 @@
2426
},
2527
"13228dab8ce04617af318a2888b3c548": {
2628
"active_preset": "home",
29+
"available_schedules": [],
2730
"climate_mode": "heat",
2831
"control_state": "idle",
2932
"dev_class": "climate",
3033
"model": "ThermoZone",
3134
"name": "Woonkamer",
3235
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
36+
"select_schedule": null,
3337
"sensors": {
3438
"temperature": 27.4
3539
},
@@ -237,12 +241,14 @@
237241
},
238242
"d27aede973b54be484f6842d1b2802ad": {
239243
"active_preset": "home",
244+
"available_schedules": [],
240245
"climate_mode": "heat",
241246
"control_state": "idle",
242247
"dev_class": "climate",
243248
"model": "ThermoZone",
244249
"name": "Kinderkamer",
245250
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
251+
"select_schedule": null,
246252
"sensors": {
247253
"temperature": 30.0
248254
},
@@ -284,12 +290,14 @@
284290
},
285291
"d58fec52899f4f1c92e4f8fad6d8c48c": {
286292
"active_preset": "home",
293+
"available_schedules": [],
287294
"climate_mode": "heat",
288295
"control_state": "idle",
289296
"dev_class": "climate",
290297
"model": "ThermoZone",
291298
"name": "Logeerkamer",
292299
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
300+
"select_schedule": null,
293301
"sensors": {
294302
"temperature": 30.0
295303
},

fixtures/adam_multiple_devices_per_zone/data.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,6 @@
596596
"warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device."
597597
}
598598
},
599-
"select_regulation_mode": "heating",
600599
"sensors": {
601600
"outdoor_temperature": 7.81
602601
},

fixtures/adam_plus_anna/data.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"error": "There is no OpenTherm communication with the boiler."
9090
}
9191
},
92-
"select_regulation_mode": "heating",
9392
"sensors": {
9493
"outdoor_temperature": 11.9
9594
},

fixtures/adam_zone_per_device/data.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,6 @@
580580
"warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device."
581581
}
582582
},
583-
"select_regulation_mode": "heating",
584583
"sensors": {
585584
"outdoor_temperature": 7.69
586585
},

fixtures/legacy_anna/data.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
},
3636
"0d266432d64443e283b5d708ae98b455": {
3737
"active_preset": "home",
38+
"available_schedules": [],
3839
"climate_mode": "heat",
3940
"control_state": "heating",
4041
"dev_class": "thermostat",
@@ -44,6 +45,7 @@
4445
"model": "ThermoTouch",
4546
"name": "Anna",
4647
"preset_modes": ["away", "vacation", "asleep", "home", "no_frost"],
48+
"select_schedule": null,
4749
"sensors": {
4850
"illuminance": 150.8,
4951
"setpoint": 20.5,

fixtures/m_adam_jip/data.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"06aecb3d00354375924f50c47af36bd2": {
33
"active_preset": "no_frost",
4+
"available_schedules": [],
45
"climate_mode": "off",
56
"dev_class": "climate",
67
"model": "ThermoZone",
78
"name": "Slaapkamer",
89
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
10+
"select_schedule": null,
911
"sensors": {
1012
"temperature": 24.2
1113
},
@@ -23,12 +25,14 @@
2325
},
2426
"13228dab8ce04617af318a2888b3c548": {
2527
"active_preset": "home",
28+
"available_schedules": [],
2629
"climate_mode": "heat",
2730
"control_state": "idle",
2831
"dev_class": "climate",
2932
"model": "ThermoZone",
3033
"name": "Woonkamer",
3134
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
35+
"select_schedule": null,
3236
"sensors": {
3337
"temperature": 27.4
3438
},
@@ -236,12 +240,14 @@
236240
},
237241
"d27aede973b54be484f6842d1b2802ad": {
238242
"active_preset": "home",
243+
"available_schedules": [],
239244
"climate_mode": "heat",
240245
"control_state": "idle",
241246
"dev_class": "climate",
242247
"model": "ThermoZone",
243248
"name": "Kinderkamer",
244249
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
250+
"select_schedule": null,
245251
"sensors": {
246252
"temperature": 30.0
247253
},
@@ -283,12 +289,14 @@
283289
},
284290
"d58fec52899f4f1c92e4f8fad6d8c48c": {
285291
"active_preset": "home",
292+
"available_schedules": [],
286293
"climate_mode": "heat",
287294
"control_state": "idle",
288295
"dev_class": "climate",
289296
"model": "ThermoZone",
290297
"name": "Logeerkamer",
291298
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
299+
"select_schedule": null,
292300
"sensors": {
293301
"temperature": 30.0
294302
},

fixtures/m_adam_multiple_devices_per_zone/data.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,14 @@
112112
},
113113
"446ac08dd04d4eff8ac57489757b7314": {
114114
"active_preset": "no_frost",
115+
"available_schedules": [],
115116
"climate_mode": "heat",
116117
"control_state": "idle",
117118
"dev_class": "climate",
118119
"model": "ThermoZone",
119120
"name": "Garage",
120121
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
122+
"select_schedule": null,
121123
"sensors": {
122124
"temperature": 15.6
123125
},
@@ -587,7 +589,6 @@
587589
"warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device."
588590
}
589591
},
590-
"select_regulation_mode": "heating",
591592
"sensors": {
592593
"outdoor_temperature": 7.81
593594
},

plugwise/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ class GwEntityData(TypedDict, total=False):
553553
preset_modes: list[str] | None
554554
# Schedules:
555555
available_schedules: list[str]
556-
select_schedule: str
556+
select_schedule: str | None
557557

558558
climate_mode: str
559559
# Extra for Adam Master Thermostats

plugwise/data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,13 @@ def _climate_data(
268268
data["active_preset"] = self._preset(loc_id)
269269

270270
# Schedule
271+
data["available_schedules"] = []
272+
data["select_schedule"] = None
273+
self._count += 2
271274
avail_schedules, sel_schedule = self._schedules(loc_id)
272275
if avail_schedules != [NONE]:
273276
data["available_schedules"] = avail_schedules
274277
data["select_schedule"] = sel_schedule
275-
self._count += 2
276278

277279
# Set HA climate HVACMode: auto, heat, heat_cool, cool and off
278280
data["climate_mode"] = "auto"

0 commit comments

Comments
 (0)