From 1855f1ae85e23df758e7c8fa3f4bf20e320ba983 Mon Sep 17 00:00:00 2001 From: Erik Eriksson Date: Fri, 2 Jun 2017 09:02:26 +0200 Subject: [PATCH] fix for https://github.com/home-assistant/home-assistant/issues/7019 (#7618) --- homeassistant/components/tellduslive.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/tellduslive.py b/homeassistant/components/tellduslive.py index a9f3cea81e7..4c85fe8a2bd 100644 --- a/homeassistant/components/tellduslive.py +++ b/homeassistant/components/tellduslive.py @@ -7,7 +7,8 @@ https://home-assistant.io/components/tellduslive/ from datetime import datetime, timedelta import logging -from homeassistant.const import ATTR_BATTERY_LEVEL, DEVICE_DEFAULT_NAME +from homeassistant.const import ( + ATTR_BATTERY_LEVEL, DEVICE_DEFAULT_NAME, EVENT_HOMEASSISTANT_START) from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity @@ -56,7 +57,8 @@ def setup(hass, config): return False hass.data[DOMAIN] = client - client.update(utcnow()) + + hass.bus.listen(EVENT_HOMEASSISTANT_START, client.update) return True @@ -91,7 +93,7 @@ class TelldusLiveClient(object): response = self._client.request_user() return response and 'email' in response - def update(self, now): + def update(self, *args): """Periodically poll the servers for current state.""" _LOGGER.debug("Updating") try: