Open federicoemartinez opened 6 years ago
Hey there, thanks for bringing this up.
The catch will probably have to go somewhere in here. I'm compiling a list of fixes/small things to add with some free time in the next few weeks, will definitely be investigating this one.
I was thinking of something like
try:
presets.update_presets_if_necessary()
except ConnectionError:
# There was an error connecting to the hue lights
# let's pretend it is a new user
self._set_startup_for_new_user()
return
with
def _set_startup_for_new_user(self):
self.url = self.base_url + 'new-user'
self.new_user = True
So I don't repeat that code. Did you have something like that in mind?
I could try to create a PR if you agree and if you tell me where I should look.