Skip to content

Commit 696a592

Browse files
committed
Revert "Merge pull request #436 from plugwise/elga-bug"
This reverts commit 7d960e5, reversing changes made to 69e66fa.
1 parent 7d960e5 commit 696a592

File tree

10 files changed

+101
-117
lines changed

10 files changed

+101
-117
lines changed

CHANGELOG.md

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

3-
## v0.34.1
4-
5-
- Anna+Elga now always has `cooling_present` set to `True`: the Elga (always) has cooling-capability.
6-
- Cooling-mode on/off is determined from specific Elga status-codes
7-
83
## v0.34.0
94

105
- New feature: for Adam, provide mode = off, related to the regulation_mode = off, and mode = cool, for regulation_mode = cooling.

fixtures/anna_elga_2/all_data.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"binary_sensors": {
66
"compressor_state": false,
77
"cooling_enabled": false,
8-
"cooling_state": false,
98
"dhw_state": false,
109
"flame_state": false,
1110
"heating_state": false,
@@ -19,7 +18,7 @@
1918
"setpoint": 60.0,
2019
"upper_bound": 100.0
2120
},
22-
"model": "Generic heater/cooler",
21+
"model": "Generic heater",
2322
"name": "OpenTherm",
2423
"sensors": {
2524
"domestic_hot_water_setpoint": 60.0,
@@ -51,8 +50,7 @@
5150
"cooling_activation_outdoor_temperature": 26.0,
5251
"cooling_deactivation_threshold": 3.0,
5352
"illuminance": 0.5,
54-
"setpoint_high": 30.0,
55-
"setpoint_low": 19.5,
53+
"setpoint": 19.5,
5654
"temperature": 20.9
5755
},
5856
"temperature_offset": {
@@ -64,8 +62,7 @@
6462
"thermostat": {
6563
"lower_bound": 4.0,
6664
"resolution": 0.1,
67-
"setpoint_high": 30.0,
68-
"setpoint_low": 19.5,
65+
"setpoint": 19.5,
6966
"upper_bound": 30.0
7067
},
7168
"vendor": "Plugwise"
@@ -88,10 +85,10 @@
8885
}
8986
},
9087
"gateway": {
91-
"cooling_present": true,
88+
"cooling_present": false,
9289
"gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f",
9390
"heater_id": "573c152e7d4f4720878222bd75638f5b",
94-
"item_count": 62,
91+
"item_count": 59,
9592
"notifications": {},
9693
"smile_name": "Smile Anna"
9794
}

fixtures/anna_elga_2_schedule_off/all_data.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"binary_sensors": {
66
"compressor_state": false,
77
"cooling_enabled": false,
8-
"cooling_state": false,
98
"dhw_state": false,
109
"flame_state": false,
1110
"heating_state": false,
@@ -19,7 +18,7 @@
1918
"setpoint": 60.0,
2019
"upper_bound": 100.0
2120
},
22-
"model": "Generic heater/cooler",
21+
"model": "Generic heater",
2322
"name": "OpenTherm",
2423
"sensors": {
2524
"domestic_hot_water_setpoint": 60.0,
@@ -42,7 +41,7 @@
4241
"firmware": "2018-02-08T11:15:53+01:00",
4342
"hardware": "6539-1301-5002",
4443
"location": "d3ce834534114348be628b61b26d9220",
45-
"mode": "heat_cool",
44+
"mode": "heat",
4645
"model": "ThermoTouch",
4746
"name": "Anna",
4847
"preset_modes": ["away", "no_frost", "vacation", "home", "asleep"],
@@ -51,8 +50,7 @@
5150
"cooling_activation_outdoor_temperature": 26.0,
5251
"cooling_deactivation_threshold": 3.0,
5352
"illuminance": 0.5,
54-
"setpoint_high": 30.0,
55-
"setpoint_low": 19.5,
53+
"setpoint": 19.5,
5654
"temperature": 20.9
5755
},
5856
"temperature_offset": {
@@ -64,8 +62,7 @@
6462
"thermostat": {
6563
"lower_bound": 4.0,
6664
"resolution": 0.1,
67-
"setpoint_high": 30.0,
68-
"setpoint_low": 19.5,
65+
"setpoint": 19.5,
6966
"upper_bound": 30.0
7067
},
7168
"vendor": "Plugwise"
@@ -88,10 +85,10 @@
8885
}
8986
},
9087
"gateway": {
91-
"cooling_present": true,
88+
"cooling_present": false,
9289
"gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f",
9390
"heater_id": "573c152e7d4f4720878222bd75638f5b",
94-
"item_count": 62,
91+
"item_count": 59,
9592
"notifications": {},
9693
"smile_name": "Smile Anna"
9794
}

fixtures/anna_heatpump_heating/all_data.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"binary_sensors": {
2222
"compressor_state": true,
2323
"cooling_enabled": false,
24-
"cooling_state": false,
2524
"dhw_state": false,
2625
"flame_state": false,
2726
"heating_state": true,
@@ -41,7 +40,7 @@
4140
"setpoint": 60.0,
4241
"upper_bound": 100.0
4342
},
44-
"model": "Generic heater/cooler",
43+
"model": "Generic heater",
4544
"name": "OpenTherm",
4645
"sensors": {
4746
"dhw_temperature": 46.3,
@@ -73,8 +72,7 @@
7372
"cooling_activation_outdoor_temperature": 21.0,
7473
"cooling_deactivation_threshold": 4.0,
7574
"illuminance": 86.0,
76-
"setpoint_high": 30.0,
77-
"setpoint_low": 20.5,
75+
"setpoint": 20.5,
7876
"temperature": 19.3
7977
},
8078
"temperature_offset": {
@@ -86,18 +84,17 @@
8684
"thermostat": {
8785
"lower_bound": 4.0,
8886
"resolution": 0.1,
89-
"setpoint_high": 30.0,
90-
"setpoint_low": 20.5,
87+
"setpoint": 20.5,
9188
"upper_bound": 30.0
9289
},
9390
"vendor": "Plugwise"
9491
}
9592
},
9693
"gateway": {
97-
"cooling_present": true,
94+
"cooling_present": false,
9895
"gateway_id": "015ae9ea3f964e668e490fa39da3870b",
9996
"heater_id": "1cbf783bb11e4a7c8a6843dee3a86927",
100-
"item_count": 66,
97+
"item_count": 63,
10198
"notifications": {},
10299
"smile_name": "Smile Anna"
103100
}

fixtures/m_anna_heatpump_cooling/all_data.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"cooling_activation_outdoor_temperature": 21.0,
7474
"cooling_deactivation_threshold": 4.0,
7575
"illuminance": 86.0,
76-
"setpoint_high": 30.0,
76+
"setpoint_high": 24.0,
7777
"setpoint_low": 20.5,
7878
"temperature": 26.3
7979
},
@@ -86,7 +86,7 @@
8686
"thermostat": {
8787
"lower_bound": 4.0,
8888
"resolution": 0.1,
89-
"setpoint_high": 30.0,
89+
"setpoint_high": 24.0,
9090
"setpoint_low": 20.5,
9191
"upper_bound": 30.0
9292
},
@@ -97,7 +97,7 @@
9797
"cooling_present": true,
9898
"gateway_id": "015ae9ea3f964e668e490fa39da3870b",
9999
"heater_id": "1cbf783bb11e4a7c8a6843dee3a86927",
100-
"item_count": 66,
100+
"item_count": 63,
101101
"notifications": {},
102102
"smile_name": "Smile Anna"
103103
}

fixtures/m_anna_heatpump_idle/all_data.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"cooling_activation_outdoor_temperature": 25.0,
7474
"cooling_deactivation_threshold": 4.0,
7575
"illuminance": 86.0,
76-
"setpoint_high": 30.0,
76+
"setpoint_high": 24.0,
7777
"setpoint_low": 20.5,
7878
"temperature": 23.0
7979
},
@@ -86,7 +86,7 @@
8686
"thermostat": {
8787
"lower_bound": 4.0,
8888
"resolution": 0.1,
89-
"setpoint_high": 30.0,
89+
"setpoint_high": 24.0,
9090
"setpoint_low": 20.5,
9191
"upper_bound": 30.0
9292
},
@@ -97,7 +97,7 @@
9797
"cooling_present": true,
9898
"gateway_id": "015ae9ea3f964e668e490fa39da3870b",
9999
"heater_id": "1cbf783bb11e4a7c8a6843dee3a86927",
100-
"item_count": 66,
100+
"item_count": 63,
101101
"notifications": {},
102102
"smile_name": "Smile Anna"
103103
}

plugwise/helper.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,13 +1027,16 @@ def _get_measurement_data(self, dev_id: str) -> DeviceData:
10271027
if self._is_thermostat and self.smile(ANNA) and dev_id == self._heater_id:
10281028
# Anna+Elga: base cooling_state on the elga-status-code
10291029
if "elga_status_code" in data:
1030-
# Techneco Elga has cooling-capability
1031-
self._cooling_present = True
1032-
data["model"] = "Generic heater/cooler"
1033-
self._cooling_enabled = data["elga_status_code"] in [8, 9]
1034-
data["binary_sensors"]["cooling_state"] = self._cooling_active = (
1035-
data["elga_status_code"] == 8
1036-
)
1030+
# Determine _cooling_present and _cooling_enabled
1031+
if (
1032+
"cooling_enabled" in data["binary_sensors"]
1033+
and data["binary_sensors"]["cooling_enabled"]
1034+
):
1035+
self._cooling_present = self._cooling_enabled = True
1036+
data["model"] = "Generic heater/cooler"
1037+
data["binary_sensors"]["cooling_state"] = self._cooling_active = (
1038+
data["elga_status_code"] == 8
1039+
)
10371040
data.pop("elga_status_code", None)
10381041
self._count -= 1
10391042
# Elga has no cooling-switch

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "plugwise"
7-
version = "0.34.1"
7+
version = "0.34.0"
88
license = {file = "LICENSE"}
99
description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
1010
readme = "README.md"

scripts/manual_fixtures.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,19 @@ def json_writer(manual_name: str, all_data: dict, notifications: dict):
282282
] = 28.2
283283

284284
# Go for 3cb7
285+
m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"][
286+
"thermostat"
287+
].pop("setpoint")
285288
m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"][
286289
"setpoint_low"
287290
] = 20.5
288291
m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"][
289292
"setpoint_high"
290-
] = 30.0
293+
] = 24.0
291294

295+
m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"].pop(
296+
"setpoint"
297+
)
292298
m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][
293299
"temperature"
294300
] = 26.3
@@ -297,7 +303,7 @@ def json_writer(manual_name: str, all_data: dict, notifications: dict):
297303
] = 20.5
298304
m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][
299305
"setpoint_high"
300-
] = 30.0
306+
] = 24.0
301307

302308
json_writer("m_anna_heatpump_cooling", m_anna_heatpump_cooling, base_n)
303309

0 commit comments

Comments
 (0)