1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-08 23:34:22 +01:00

Default dict if parent class returned None

This commit is contained in:
pavoni
2015-09-27 17:06:49 +01:00
parent 9a6b2c1831
commit e7320fe969
+1 -1
View File
@@ -122,7 +122,7 @@ class VeraSwitch(ToggleEntity):
@property
def state_attributes(self):
attr = super().state_attributes
attr = super().state_attributes or {}
if self.vera_device.has_battery:
attr[ATTR_BATTERY_LEVEL] = self.vera_device.battery_level + '%'