mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix Fibaro component failure to load with HC3 (#38528)
Fixed a rarely occuring problem (maybe a change with Fibaro HC3) where some scenes don't have a "visible" parameter, which was assumed to be mandatory in the past.
This commit is contained in:
parent
0c030cb8cf
commit
fe07d79744
@ -235,7 +235,7 @@ class FibaroController:
|
||||
scenes = self._client.scenes.list()
|
||||
self._scene_map = {}
|
||||
for device in scenes:
|
||||
if not device.visible:
|
||||
if "visible" in device and not device.visible:
|
||||
continue
|
||||
device.fibaro_controller = self
|
||||
if device.roomID == 0:
|
||||
@ -292,7 +292,11 @@ class FibaroController:
|
||||
# otherwise add the first visible device in the group
|
||||
# which is a hack, but solves a problem with FGT having
|
||||
# hidden compatibility devices before the real device
|
||||
if last_climate_parent != device.parentId and device.visible:
|
||||
if (
|
||||
last_climate_parent != device.parentId
|
||||
and "visible" in device
|
||||
and device.visible
|
||||
):
|
||||
self.fibaro_devices[dtype].append(device)
|
||||
last_climate_parent = device.parentId
|
||||
_LOGGER.debug(
|
||||
|
Loading…
x
Reference in New Issue
Block a user