mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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):
|
class TelldusLiveLight(TelldusLiveEntity, Light):
|
||||||
"""Representation of a 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):
|
def changed(self):
|
||||||
"""A property of the device might have changed."""
|
"""A property of the device might have changed."""
|
||||||
# pylint: disable=attribute-defined-outside-init
|
|
||||||
self._last_brightness = self.brightness
|
self._last_brightness = self.brightness
|
||||||
super().changed()
|
super().changed()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user