Skip to content

Commit 0d5e5c7

Browse files
authored
Merge pull request #76 from plugwise/fix_types
Fix errors from the previous commits
2 parents fa313c0 + b36b771 commit 0d5e5c7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

plugwise/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Plugwise module."""
22

3-
__version__ = "0.9.4a7"
3+
__version__ = "0.9.4a8"
44

55
from plugwise.smile import Smile
66
from plugwise.stick import stick

plugwise/helper.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,18 +380,14 @@ def appliance_info_finder(self, appliance, appl):
380380

381381
def appliance_types_finder(self, appliance, appl):
382382
"""Determine type(s) per appliance."""
383-
# For legacy Anna gateway and heater_central is the same device
384-
if self._smile_legacy and self.smile_type == "thermostat":
385-
self.gateway_id = self.heater_id
386-
387-
# Preset all types applicable to home
388-
appl.types = self._loc_data[self._home_location]["types"]
389-
390383
# Appliance with location (i.e. a device)
391384
if appliance.find("location") is not None:
392385
appl.location = appliance.find("location").attrib["id"]
393386
for appl_type in types_finder(appliance):
394387
appl.types.add(appl_type)
388+
else:
389+
# Preset all types applicable to home
390+
appl.types = self._loc_data[self._home_location]["types"]
395391

396392
# Determine appliance_type from functionality
397393
relay_func = appliance.find(".//actuator_functionalities/relay_functionality")
@@ -476,6 +472,10 @@ def all_appliances(self):
476472
"vendor": appl.v_name,
477473
}
478474

475+
# For legacy Anna gateway and heater_central is the same device
476+
if self._smile_legacy and self.smile_type == "thermostat":
477+
self.gateway_id = self.heater_id
478+
479479
def match_locations(self):
480480
"""Update locations with present appliance-types."""
481481
matched_locations = {}

0 commit comments

Comments
 (0)