mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Check against Switch attr not being None (#32647)
This commit is contained in:
parent
b2bb9cf134
commit
89fc430eec
@ -103,7 +103,7 @@ class SwitchDevice(ToggleEntity):
|
|||||||
|
|
||||||
for prop, attr in PROP_TO_ATTR.items():
|
for prop, attr in PROP_TO_ATTR.items():
|
||||||
value = getattr(self, prop)
|
value = getattr(self, prop)
|
||||||
if value:
|
if value is not None:
|
||||||
data[attr] = value
|
data[attr] = value
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user