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 GitHub
parent 7b247a79cf
commit 06b1a4c2b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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