mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Check against Switch attr not being None (#32647)
This commit is contained in:
@@ -103,7 +103,7 @@ class SwitchDevice(ToggleEntity):
|
||||
|
||||
for prop, attr in PROP_TO_ATTR.items():
|
||||
value = getattr(self, prop)
|
||||
if value:
|
||||
if value is not None:
|
||||
data[attr] = value
|
||||
|
||||
return data
|
||||
|
Reference in New Issue
Block a user