mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Fix Tuya Light without brightness (#26534)
Return none if there is brightness data from tuya https://github.com/home-assistant/home-assistant/issues/25896
This commit is contained in:
parent
7d71976e01
commit
702e63e6e8
@ -40,6 +40,8 @@ class TuyaLight(TuyaDevice, Light):
|
|||||||
@property
|
@property
|
||||||
def brightness(self):
|
def brightness(self):
|
||||||
"""Return the brightness of the light."""
|
"""Return the brightness of the light."""
|
||||||
|
if self.tuya.brightness() is None:
|
||||||
|
return None
|
||||||
return int(self.tuya.brightness())
|
return int(self.tuya.brightness())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user