mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix error message (#4122)
This commit is contained in:
parent
4163e55dbd
commit
5d43d3eb1c
@ -71,9 +71,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
else:
|
else:
|
||||||
host = config.get(CONF_HOST)
|
host = config.get(CONF_HOST)
|
||||||
|
|
||||||
if host is None:
|
if host is None:
|
||||||
_LOGGER.error("No host found in configuration")
|
_LOGGER.error("No TV found in configuration file or with discovery")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Only act if we are not already configuring this host
|
# Only act if we are not already configuring this host
|
||||||
if host in _CONFIGURING:
|
if host in _CONFIGURING:
|
||||||
@ -98,14 +98,14 @@ def setup_tv(host, name, customize, hass, add_devices):
|
|||||||
client.register()
|
client.register()
|
||||||
except PyLGTVPairException:
|
except PyLGTVPairException:
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"Connected to LG WebOS TV at %s but not paired", host)
|
"Connected to LG WebOS TV %s but not paired", host)
|
||||||
return
|
return
|
||||||
except OSError:
|
except OSError:
|
||||||
_LOGGER.error("Unable to connect to host %s", host)
|
_LOGGER.error("Unable to connect to host %s", host)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
# Not registered, request configuration.
|
# Not registered, request configuration.
|
||||||
_LOGGER.warning('LG WebOS TV at %s needs to be paired.', host)
|
_LOGGER.warning("LG WebOS TV %s needs to be paired", host)
|
||||||
request_configuration(host, name, customize, hass, add_devices)
|
request_configuration(host, name, customize, hass, add_devices)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ def request_configuration(host, name, customize, hass, add_devices):
|
|||||||
|
|
||||||
_CONFIGURING[host] = configurator.request_config(
|
_CONFIGURING[host] = configurator.request_config(
|
||||||
hass, 'LG WebOS TV', lgtv_configuration_callback,
|
hass, 'LG WebOS TV', lgtv_configuration_callback,
|
||||||
description='Click start and accept the pairing request on your tv.',
|
description='Click start and accept the pairing request on your TV.',
|
||||||
description_image='/static/images/config_webos.png',
|
description_image='/static/images/config_webos.png',
|
||||||
submit_caption='Start pairing request'
|
submit_caption='Start pairing request'
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user