Skip to content

Commit

Permalink
Add previous color set
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav Hansen committed Apr 15, 2017
1 parent 38adbf9 commit edb3bed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions hue_plus/hue_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def __init__(self):
self.error("No Hue+ found.")

self.profileListFunc()
hue.write(ser, previous.get_previous()) # Set the previous colors

def error(self, message):
msg = QMessageBox()
Expand Down
4 changes: 4 additions & 0 deletions hue_plus/previous.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ def get_colors(channel, changer):
write(data[0], changer[0], profiles)
return [data[0], changer[0]]

def get_previous():
data, profiles = read()
return data

def add_profile(name):
data, profiles = read()
profiles[name] = data
Expand Down

0 comments on commit edb3bed

Please sign in to comment.