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()
|
scenes = self._client.scenes.list()
|
||||||
self._scene_map = {}
|
self._scene_map = {}
|
||||||
for device in scenes:
|
for device in scenes:
|
||||||
if not device.visible:
|
if "visible" in device and not device.visible:
|
||||||
continue
|
continue
|
||||||
device.fibaro_controller = self
|
device.fibaro_controller = self
|
||||||
if device.roomID == 0:
|
if device.roomID == 0:
|
||||||
@ -292,7 +292,11 @@ class FibaroController:
|
|||||||
# otherwise add the first visible device in the group
|
# otherwise add the first visible device in the group
|
||||||
# which is a hack, but solves a problem with FGT having
|
# which is a hack, but solves a problem with FGT having
|
||||||
# hidden compatibility devices before the real device
|
# 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)
|
self.fibaro_devices[dtype].append(device)
|
||||||
last_climate_parent = device.parentId
|
last_climate_parent = device.parentId
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user