From 757f6278eb93db41d0a57137969635c24afc3304 Mon Sep 17 00:00:00 2001 From: Erik Eriksson Date: Fri, 16 Dec 2016 07:35:53 +0100 Subject: [PATCH] initialize self._last_brightness (#4917) --- homeassistant/components/light/tellduslive.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/light/tellduslive.py b/homeassistant/components/light/tellduslive.py index f919268c380..31f9eb1d253 100644 --- a/homeassistant/components/light/tellduslive.py +++ b/homeassistant/components/light/tellduslive.py @@ -26,9 +26,13 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class TelldusLiveLight(TelldusLiveEntity, Light): """Representation of a light.""" + def __init__(self, hass, device_id): + """Initialize the light.""" + super().__init__(hass, device_id) + self._last_brightness = self.brightness + def changed(self): """A property of the device might have changed.""" - # pylint: disable=attribute-defined-outside-init self._last_brightness = self.brightness super().changed()