mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Add tests, fix styling
This commit is contained in:
@@ -174,6 +174,7 @@ def setup(hass, config):
|
||||
|
||||
configurator_ids = []
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
def hue_configuration_callback(data):
|
||||
""" Fake callback, mark config as done. """
|
||||
time.sleep(2)
|
||||
@@ -181,12 +182,12 @@ def setup(hass, config):
|
||||
# First time it is called, pretend it failed.
|
||||
if len(configurator_ids) == 1:
|
||||
configurator.notify_errors(
|
||||
hass, configurator_ids[0],
|
||||
configurator_ids[0],
|
||||
"Failed to register, please try again.")
|
||||
|
||||
configurator_ids.append(0)
|
||||
else:
|
||||
configurator.request_done(hass, configurator_ids[0])
|
||||
configurator.request_done(configurator_ids[0])
|
||||
|
||||
request_id = configurator.request_config(
|
||||
hass, "Philips Hue", hue_configuration_callback,
|
||||
|
||||
Reference in New Issue
Block a user