mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Fixed crash during light objects initizilation (#4835)
* Fixed crash when lights objects was inited
This commit is contained in:
parent
ee5b9e7291
commit
7ba25f3526
@ -72,7 +72,11 @@ class TellstickLight(TellstickDevice, Light):
|
|||||||
if brightness is not None:
|
if brightness is not None:
|
||||||
self._brightness = brightness
|
self._brightness = brightness
|
||||||
|
|
||||||
self._state = (self._brightness > 0)
|
# _brightness is not defined when called from super
|
||||||
|
try:
|
||||||
|
self._state = (self._brightness > 0)
|
||||||
|
except AttributeError:
|
||||||
|
self._state = True
|
||||||
else:
|
else:
|
||||||
self._state = False
|
self._state = False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user