Strip white space from configurator input (#10317)
This commit is contained in:
parent
1ffccfc91c
commit
31b89f602a
1 changed files with 2 additions and 3 deletions
|
@ -160,7 +160,6 @@ def _request_app_setup(hass, config):
|
||||||
hass.data[DOMAIN]['configurator'] = True
|
hass.data[DOMAIN]['configurator'] = True
|
||||||
configurator = hass.components.configurator
|
configurator = hass.components.configurator
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
|
||||||
def wink_configuration_callback(callback_data):
|
def wink_configuration_callback(callback_data):
|
||||||
"""Handle configuration updates."""
|
"""Handle configuration updates."""
|
||||||
_config_path = hass.config.path(WINK_CONFIG_FILE)
|
_config_path = hass.config.path(WINK_CONFIG_FILE)
|
||||||
|
@ -168,8 +167,8 @@ def _request_app_setup(hass, config):
|
||||||
setup(hass, config)
|
setup(hass, config)
|
||||||
return
|
return
|
||||||
|
|
||||||
client_id = callback_data.get('client_id')
|
client_id = callback_data.get('client_id').strip()
|
||||||
client_secret = callback_data.get('client_secret')
|
client_secret = callback_data.get('client_secret').strip()
|
||||||
if None not in (client_id, client_secret):
|
if None not in (client_id, client_secret):
|
||||||
save_json(_config_path,
|
save_json(_config_path,
|
||||||
{ATTR_CLIENT_ID: client_id,
|
{ATTR_CLIENT_ID: client_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue