From f5937549d8bb791d251c06ac7c3d0e56ceac8308 Mon Sep 17 00:00:00 2001 From: marcelveldt Date: Sat, 19 Oct 2019 17:57:59 +0200 Subject: [PATCH] Update homeassistant.py --- music_assistant/homeassistant.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/music_assistant/homeassistant.py b/music_assistant/homeassistant.py index 94bdae78..482bab73 100644 --- a/music_assistant/homeassistant.py +++ b/music_assistant/homeassistant.py @@ -59,11 +59,12 @@ class HomeAssistant(): (config[CONF_URL] or config[CONF_TOKEN])): LOGGER.warning("Invalid configuration for Home Assistant") self.enabled = False - self._token = config[CONF_TOKEN] if IS_HASSIO: + self._token = os.environ['HASSIO_TOKEN'] self._use_ssl = False self._host = 'hassio/homeassistant' else: + self._token = config[CONF_TOKEN] url = config[CONF_URL] if url.startswith('https://'): self._use_ssl = True -- 2.34.1