1
0
mirror of https://github.com/elisspace/core.git synced 2026-09-01 08:53:56 +00: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

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