Ensure server_host is respected in configuration.yaml

This commit is contained in:
Andrew McClure 2016-04-07 13:45:40 +12:00 committed by Paulus Schoutsen
parent 5a32ddbe6f
commit c99617d6e5

View file

@ -77,7 +77,9 @@ def setup(hass, config):
name='HTTP-server').start())
hass.http = server
hass.config.api = rem.API(util.get_local_ip(), api_password, server_port,
hass.config.api = rem.API(server_host if server_host != '0.0.0.0'
else util.get_local_ip(),
api_password, server_port,
ssl_certificate is not None)
return True