If brightness is not available, don't set a value (#78827)
This commit is contained in:
parent
e05ca87cc7
commit
bd0daf68e0
2 changed files with 1 additions and 4 deletions
|
@ -260,8 +260,6 @@ class BrightnessTrait(_Trait):
|
|||
brightness = self.state.attributes.get(light.ATTR_BRIGHTNESS)
|
||||
if brightness is not None:
|
||||
response["brightness"] = round(100 * (brightness / 255))
|
||||
else:
|
||||
response["brightness"] = 0
|
||||
|
||||
return response
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue