mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +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
|
self.fibaro_device.properties.batteryLevel
|
||||||
)
|
)
|
||||||
if "armed" in self.fibaro_device.properties:
|
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):
|
except (ValueError, KeyError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user