Ensure filename arg is passed around everywhere it's needed.

This commit is contained in:
Roy Hooper 2016-01-03 15:30:06 -05:00
parent 0361f37178
commit d0a8a57ae4

View file

@ -90,7 +90,7 @@ def setup_bridge(host, hass, add_devices_callback, filename):
except phue.PhueRegistrationException:
_LOGGER.warning("Connected to Hue at %s but not registered.", host)
request_configuration(host, hass, add_devices_callback)
request_configuration(host, hass, add_devices_callback, filename)
return
@ -143,7 +143,7 @@ def setup_bridge(host, hass, add_devices_callback, filename):
update_lights()
def request_configuration(host, hass, add_devices_callback):
def request_configuration(host, hass, add_devices_callback, filename):
""" Request configuration steps from the user. """
configurator = get_component('configurator')
@ -157,7 +157,7 @@ def request_configuration(host, hass, add_devices_callback):
# pylint: disable=unused-argument
def hue_configuration_callback(data):
""" Actions to do when our configuration callback is called. """
setup_bridge(host, hass, add_devices_callback)
setup_bridge(host, hass, add_devices_callback, filename)
_CONFIGURING[host] = configurator.request_config(
hass, "Philips Hue", hue_configuration_callback,