Fix armed extra state attribute in fibaro entity (#80034)

This commit is contained in:
rappenze 2022-10-10 19:14:43 +02:00 committed by Franck Nijhof
parent a6a0741c10
commit d9f4798ddd
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -650,8 +650,8 @@ class FibaroDevice(Entity):
attr[ATTR_BATTERY_LEVEL] = int(
self.fibaro_device.properties.batteryLevel
)
if "fibaroAlarmArm" in self.fibaro_device.interfaces:
attr[ATTR_ARMED] = bool(self.fibaro_device.properties.armed)
if "armed" in self.fibaro_device.properties:
attr[ATTR_ARMED] = self.fibaro_device.properties.armed.lower() == "true"
except (ValueError, KeyError):
pass