Strip white space from configurator input (#10317)

pull/10313/head
William Scanlon 2017-11-03 11:58:03 -04:00 committed by Paulus Schoutsen
parent 1ffccfc91c
commit 31b89f602a
1 changed files with 2 additions and 3 deletions

View File

@ -160,7 +160,6 @@ def _request_app_setup(hass, config):
hass.data[DOMAIN]['configurator'] = True
configurator = hass.components.configurator
# pylint: disable=unused-argument
def wink_configuration_callback(callback_data):
"""Handle configuration updates."""
_config_path = hass.config.path(WINK_CONFIG_FILE)
@ -168,8 +167,8 @@ def _request_app_setup(hass, config):
setup(hass, config)
return
client_id = callback_data.get('client_id')
client_secret = callback_data.get('client_secret')
client_id = callback_data.get('client_id').strip()
client_secret = callback_data.get('client_secret').strip()
if None not in (client_id, client_secret):
save_json(_config_path,
{ATTR_CLIENT_ID: client_id,