mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
initialize self._last_brightness (#4917)
This commit is contained in:
parent
b9dcc2777b
commit
757f6278eb
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user