From 1041dbe23c4605e7413ea37e749db1b2b6957187 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 3 Apr 2020 19:42:06 -0700 Subject: [PATCH] Hass.io integration do not warn safe mode (#33600) * Hass.io integration do not warn safe mode * Better implementation * Tweak log message --- homeassistant/components/hassio/handler.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/hassio/handler.py b/homeassistant/components/hassio/handler.py index e471bfae543..bb41e5335d7 100644 --- a/homeassistant/components/hassio/handler.py +++ b/homeassistant/components/hassio/handler.py @@ -10,6 +10,7 @@ from homeassistant.components.http import ( CONF_SERVER_HOST, CONF_SERVER_PORT, CONF_SSL_CERTIFICATE, + DEFAULT_SERVER_HOST, ) from homeassistant.const import SERVER_PORT @@ -133,9 +134,14 @@ class HassIO: "refresh_token": refresh_token.token, } - if CONF_SERVER_HOST in http_config: + if ( + http_config.get(CONF_SERVER_HOST, DEFAULT_SERVER_HOST) + != DEFAULT_SERVER_HOST + ): options["watchdog"] = False - _LOGGER.warning("Don't use 'server_host' options with Hass.io") + _LOGGER.warning( + "Found incompatible HTTP option 'server_host'. Watchdog feature disabled" + ) return await self.send_command("/homeassistant/options", payload=options)