Skip to content

Commit 4e664b4

Browse files
authored
Merge pull request #765 from plugwise/pw-v1.5.1
Link to plugwise v1.5.1 and adapt
2 parents 4cde09e + 8194185 commit 4e664b4

File tree

13 files changed

+33
-28
lines changed

13 files changed

+33
-28
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Versions from 0.40 and up
44

5+
## v0.54.2
6+
7+
- Link to plugwise [v1.5.1](https://github.com/plugwise/python-plugwise/releases/tag/v1.5.1) and adapt:
8+
- Change thermostat device-key `mode` to `climate_mode`
9+
510
## v0.54.1
611

712
- Fix typing error

custom_components/plugwise/climate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
ACTIVE_PRESET,
3232
AVAILABLE_SCHEDULES,
3333
BINARY_SENSORS,
34+
CLIMATE_MODE,
3435
CONF_HOMEKIT_EMULATION, # pw-beta homekit emulation
3536
CONTROL_STATE,
3637
COOLING_PRESENT,
@@ -43,7 +44,6 @@
4344
LOGGER,
4445
LOWER_BOUND,
4546
MASTER_THERMOSTATS,
46-
MODE,
4747
REGULATION_MODES,
4848
RESOLUTION,
4949
SELECT_REGULATION_MODE,
@@ -195,7 +195,7 @@ def target_temperature_low(self) -> float:
195195
def hvac_mode(self) -> HVACMode:
196196
"""Return HVAC operation ie. auto, cool, heat, heat_cool, or off mode."""
197197
if (
198-
mode := self.device[MODE]
198+
mode := self.device[CLIMATE_MODE]
199199
) is None or mode not in self.hvac_modes: # pw-beta add to Core
200200
return HVACMode.HEAT # pragma: no cover
201201
# pw-beta homekit emulation

custom_components/plugwise/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343

4444
# Climate constants
4545
ACTIVE_PRESET: Final = "active_preset"
46+
CLIMATE_MODE: Final = "climate_mode"
4647
CONTROL_STATE: Final = "control_state"
4748
COOLING_PRESENT: Final ="cooling_present"
4849
DEV_CLASS: Final = "dev_class"
4950
NONE : Final = "None"
50-
MODE: Final = "mode"
5151
TARGET_TEMP: Final = "setpoint"
5252
TARGET_TEMP_HIGH: Final = "setpoint_high"
5353
TARGET_TEMP_LOW: Final = "setpoint_low"

custom_components/plugwise/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"integration_type": "hub",
88
"iot_class": "local_polling",
99
"loggers": ["plugwise"],
10-
"requirements": ["plugwise==1.5.0"],
11-
"version": "0.54.1",
10+
"requirements": ["plugwise==1.5.1"],
11+
"version": "0.54.2",
1212
"zeroconf": ["_plugwise._tcp.local."]
1313
}

tests/components/plugwise/fixtures/anna_heatpump_heating/all_data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@
6464
"standaard",
6565
"off"
6666
],
67+
"climate_mode": "auto",
6768
"dev_class": "thermostat",
6869
"firmware": "2018-02-08T11:15:53+01:00",
6970
"hardware": "6539-1301-5002",
7071
"location": "c784ee9fdab44e1395b8dee7d7a497d5",
71-
"mode": "auto",
7272
"model": "ThermoTouch",
7373
"name": "Anna",
7474
"preset_modes": [

tests/components/plugwise/fixtures/legacy_anna/all_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
},
3737
"0d266432d64443e283b5d708ae98b455": {
3838
"active_preset": "home",
39+
"climate_mode": "heat",
3940
"dev_class": "thermostat",
4041
"firmware": "2017-03-13T11:54:58+01:00",
4142
"hardware": "6539-1301-500",
4243
"location": "0000aaaa0000aaaa0000aaaa0000aa00",
43-
"mode": "heat",
4444
"model": "ThermoTouch",
4545
"name": "Anna",
4646
"preset_modes": [
@@ -51,7 +51,7 @@
5151
"no_frost"
5252
],
5353
"sensors": {
54-
"illuminance": 151,
54+
"illuminance": 150.8,
5555
"setpoint": 20.5,
5656
"temperature": 20.4
5757
},

tests/components/plugwise/fixtures/m_adam_cooling/all_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@
6363
"Weekschema",
6464
"off"
6565
],
66+
"climate_mode": "cool",
6667
"control_state": "cooling",
6768
"dev_class": "thermostat",
6869
"location": "f2bf9048bef64cc5b6d5110154e33c81",
69-
"mode": "cool",
7070
"model": "ThermoTouch",
7171
"model_id": "143.1",
7272
"name": "Anna",
@@ -135,12 +135,12 @@
135135
"binary_sensors": {
136136
"low_battery": true
137137
},
138+
"climate_mode": "auto",
138139
"control_state": "preheating",
139140
"dev_class": "zone_thermostat",
140141
"firmware": "2016-10-10T02:00:00+02:00",
141142
"hardware": "255",
142143
"location": "f871b8c4d63549319221e294e4f88074",
143-
"mode": "auto",
144144
"model": "Lisa",
145145
"model_id": "158-01",
146146
"name": "Lisa Badkamer",

tests/components/plugwise/fixtures/m_adam_heating/all_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@
6868
"Weekschema",
6969
"off"
7070
],
71+
"climate_mode": "heat",
7172
"control_state": "preheating",
7273
"dev_class": "thermostat",
7374
"location": "f2bf9048bef64cc5b6d5110154e33c81",
74-
"mode": "heat",
7575
"model": "ThermoTouch",
7676
"model_id": "143.1",
7777
"name": "Anna",
@@ -139,12 +139,12 @@
139139
"binary_sensors": {
140140
"low_battery": true
141141
},
142+
"climate_mode": "auto",
142143
"control_state": "off",
143144
"dev_class": "zone_thermostat",
144145
"firmware": "2016-10-10T02:00:00+02:00",
145146
"hardware": "255",
146147
"location": "f871b8c4d63549319221e294e4f88074",
147-
"mode": "auto",
148148
"model": "Lisa",
149149
"model_id": "158-01",
150150
"name": "Lisa Badkamer",

tests/components/plugwise/fixtures/m_adam_jip/all_data.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"binary_sensors": {
77
"low_battery": false
88
},
9+
"climate_mode": "off",
910
"control_state": "off",
1011
"dev_class": "zone_thermostat",
1112
"firmware": "2016-10-27T02:00:00+02:00",
1213
"hardware": "255",
1314
"location": "06aecb3d00354375924f50c47af36bd2",
14-
"mode": "off",
1515
"model": "Lisa",
1616
"model_id": "158-01",
1717
"name": "Slaapkamer",
@@ -113,12 +113,12 @@
113113
"binary_sensors": {
114114
"low_battery": false
115115
},
116+
"climate_mode": "heat",
116117
"control_state": "off",
117118
"dev_class": "zone_thermostat",
118119
"firmware": "2016-10-27T02:00:00+02:00",
119120
"hardware": "255",
120121
"location": "d27aede973b54be484f6842d1b2802ad",
121-
"mode": "heat",
122122
"model": "Lisa",
123123
"model_id": "158-01",
124124
"name": "Kinderkamer",
@@ -179,12 +179,12 @@
179179
"binary_sensors": {
180180
"low_battery": false
181181
},
182+
"climate_mode": "heat",
182183
"control_state": "off",
183184
"dev_class": "zone_thermostat",
184185
"firmware": "2016-10-27T02:00:00+02:00",
185186
"hardware": "255",
186187
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
187-
"mode": "heat",
188188
"model": "Lisa",
189189
"model_id": "158-01",
190190
"name": "Logeerkamer",
@@ -312,12 +312,12 @@
312312
"binary_sensors": {
313313
"low_battery": false
314314
},
315+
"climate_mode": "heat",
315316
"control_state": "off",
316317
"dev_class": "zone_thermometer",
317318
"firmware": "2020-09-01T02:00:00+02:00",
318319
"hardware": "1",
319320
"location": "13228dab8ce04617af318a2888b3c548",
320-
"mode": "heat",
321321
"model": "Jip",
322322
"model_id": "168-01",
323323
"name": "Woonkamer",

tests/components/plugwise/fixtures/m_adam_multiple_devices_per_zone/all_data.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@
126126
"binary_sensors": {
127127
"low_battery": false
128128
},
129+
"climate_mode": "auto",
129130
"dev_class": "zone_thermostat",
130131
"firmware": "2016-10-27T02:00:00+02:00",
131132
"hardware": "255",
132133
"location": "82fa13f017d240daa0d0ea1775420f24",
133-
"mode": "auto",
134134
"model": "Lisa",
135135
"model_id": "158-01",
136136
"name": "Zone Thermostat Jessie",
@@ -283,11 +283,11 @@
283283
"binary_sensors": {
284284
"low_battery": false
285285
},
286+
"climate_mode": "auto",
286287
"dev_class": "zone_thermostat",
287288
"firmware": "2016-08-02T02:00:00+02:00",
288289
"hardware": "255",
289290
"location": "c50f167537524366a5af7aa3942feb1e",
290-
"mode": "auto",
291291
"model": "Lisa",
292292
"model_id": "158-01",
293293
"name": "Zone Lisa WK",
@@ -382,11 +382,11 @@
382382
"binary_sensors": {
383383
"low_battery": false
384384
},
385+
"climate_mode": "heat",
385386
"dev_class": "zone_thermostat",
386387
"firmware": "2016-10-27T02:00:00+02:00",
387388
"hardware": "255",
388389
"location": "12493538af164a409c6a1c79e38afe1c",
389-
"mode": "heat",
390390
"model": "Lisa",
391391
"model_id": "158-01",
392392
"name": "Zone Lisa Bios",
@@ -424,11 +424,11 @@
424424
"binary_sensors": {
425425
"low_battery": false
426426
},
427+
"climate_mode": "heat",
427428
"dev_class": "thermostatic_radiator_valve",
428429
"firmware": "2019-03-27T01:00:00+01:00",
429430
"hardware": "1",
430431
"location": "446ac08dd04d4eff8ac57489757b7314",
431-
"mode": "heat",
432432
"model": "Tom/Floor",
433433
"model_id": "106-03",
434434
"name": "CV Kraan Garage",
@@ -475,11 +475,11 @@
475475
"binary_sensors": {
476476
"low_battery": false
477477
},
478+
"climate_mode": "auto",
478479
"dev_class": "zone_thermostat",
479480
"firmware": "2016-10-27T02:00:00+02:00",
480481
"hardware": "255",
481482
"location": "08963fec7c53423ca5680aa4cb502c63",
482-
"mode": "auto",
483483
"model": "Lisa",
484484
"model_id": "158-01",
485485
"name": "Zone Thermostat Badkamer",

0 commit comments

Comments
 (0)