From e7320fe9697b0b54f2a8e11a64f9e4fd104f4b6d Mon Sep 17 00:00:00 2001 From: pavoni Date: Sun, 27 Sep 2015 17:06:49 +0100 Subject: [PATCH] Default dict if parent class returned None --- homeassistant/components/switch/vera.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/switch/vera.py b/homeassistant/components/switch/vera.py index bb7f43522f4..548e6ca89a9 100644 --- a/homeassistant/components/switch/vera.py +++ b/homeassistant/components/switch/vera.py @@ -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 + '%'