mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix armed state in fibaro integration (#80218)
* Fix armed state in fibaro integration * Update homeassistant/components/fibaro/__init__.py Co-authored-by: Joakim Plate <elupus@ecce.se> Co-authored-by: Joakim Plate <elupus@ecce.se>
This commit is contained in:
parent
04cc2ae264
commit
d80c0ddb5f
@ -651,7 +651,13 @@ class FibaroDevice(Entity):
|
||||
self.fibaro_device.properties.batteryLevel
|
||||
)
|
||||
if "armed" in self.fibaro_device.properties:
|
||||
attr[ATTR_ARMED] = self.fibaro_device.properties.armed.lower() == "true"
|
||||
armed = self.fibaro_device.properties.armed
|
||||
if isinstance(armed, bool):
|
||||
attr[ATTR_ARMED] = armed
|
||||
elif isinstance(armed, str) and armed.lower() in ("true", "false"):
|
||||
attr[ATTR_ARMED] = armed.lower() == "true"
|
||||
else:
|
||||
attr[ATTR_ARMED] = None
|
||||
except (ValueError, KeyError):
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user