1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-13 17:44:45 +01:00

Check against Switch attr not being None (#32647)

This commit is contained in:
Paulus Schoutsen
2020-03-10 11:28:11 -07:00
committed by GitHub
parent b2bb9cf134
commit 89fc430eec
+1 -1
View File
@@ -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