Skip to content

Commit

Permalink
Fix for #14
Browse files Browse the repository at this point in the history
  • Loading branch information
CoMPaTech committed Sep 9, 2019
1 parent 7eaa431 commit 50f0aef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions haanna/haanna.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ def get_presets(self, root):
if self.is_legacy_anna(root):
return self.__get_preset_dictionary_v1(root)
else:
rule_id = self.get_rule_id_by_name(root,
'Thermostat presets')
rule_id = self.get_rule_id_by_template_tag(root,
'zone_setpoint_and_state_based_on_preset')[0]

if rule_id is None:
rule_id = self.get_rule_id_by_name(root,
'Thermostat presets')
if rule_id is None:
raise RuleIdNotFoundException("Could not find the rule id.")

if rule_id is None:
raise RuleIdNotFoundException("Could not find the rule id.")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def readme():

setup(
name='haanna',
version='0.10.1',
version='0.10.2',
description='Plugwise Anna API to use in conjunction with Home Assistant.',
long_description='Plugwise Anna API to use in conjunction with Home Assistant, but it can also be used without Home Assistant.',
keywords='HomeAssistant HA Home Assistant Anna Plugwise',
Expand Down

0 comments on commit 50f0aef

Please sign in to comment.