diff --git a/hue_plus/hue_ui.py b/hue_plus/hue_ui.py index 9eb5f70..5427f01 100755 --- a/hue_plus/hue_ui.py +++ b/hue_plus/hue_ui.py @@ -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() diff --git a/hue_plus/previous.py b/hue_plus/previous.py index 5105118..c474849 100644 --- a/hue_plus/previous.py +++ b/hue_plus/previous.py @@ -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