Skip to content

Commit

Permalink
re-add moods to main
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob4t committed Jan 4, 2020
1 parent d7e9d3c commit f82c1e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion pytradfri/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,15 @@
else:
print("No lights found!")
light = None
groups = api(gateway.get_groups())
groups_commands = api(gateway.get_groups())
groups = api(groups_commands)
moods = []
if groups:
group = groups[0]
for group in groups:
moods_commands = api(group.moods())
group_moods = api(moods_commands)
moods.extend(group_moods)
else:
print("No groups found!")
group = None
Expand Down Expand Up @@ -106,6 +112,7 @@ def dump_devices():
print("> tasks[0].repeat_days_list")
print("> api(gateway.reboot())")
print("> groups")
print("> moods")
print("> tasks")
print("> dump_devices()")
print("> dump_all()")
2 changes: 1 addition & 1 deletion pytradfri/mood.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ def path(self):
return [ROOT_MOODS, self._parent, self.id]

def __repr__(self):
return '<Mood {}>'.format(self.name)
return '<Mood {} {}>'.format(self._parent, self.name)

0 comments on commit f82c1e2

Please sign in to comment.