Skip to content

Commit 5f038bb

Browse files
committed
Better function-name, connect city heating state to gateway
1 parent e6236ac commit 5f038bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugwise/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def group_switches(self):
684684

685685
return switch_groups
686686

687-
def open_valves(self):
687+
def heating_valves(self):
688688
"""Obtain the amount of open valves, from APPLIANCES."""
689689
loc_found = 0
690690
open_valve_count = 0

plugwise/smile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ def get_device_data(self, dev_id):
267267

268268
# Adam: indicate Auxiliary heating_state based on valves being open in case of city-provided heating
269269
if self.smile_name == "Adam":
270-
if details["class"] == "heater_central":
271-
if not self.active_device_present and self.open_valves() is not None:
270+
if details["class"] == "gateway":
271+
if not self.active_device_present and self.heating_valves() is not None:
272272
device_data["heating_state"] = True
273-
if self.open_valves() == 0:
273+
if self.heating_valves() == 0:
274274
device_data["heating_state"] = False
275275

276276
if details["class"] not in THERMOSTAT_CLASSES:

0 commit comments

Comments
 (0)