Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HC3 compatibility further #38931

Merged
merged 2 commits into from Aug 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions homeassistant/components/fibaro/__init__.py
Expand Up @@ -235,10 +235,10 @@ def _read_scenes(self):
scenes = self._client.scenes.list()
self._scene_map = {}
for device in scenes:
if "visible" in device and not device.visible:
if "name" not in device or "id" not in device:
continue
device.fibaro_controller = self
if device.roomID == 0:
if "roomID" not in device or device.roomID == 0:
room_name = "Unknown"
else:
room_name = self._room_map[device.roomID].name
Expand All @@ -250,6 +250,7 @@ def _read_scenes(self):
device.unique_id_str = f"{self.hub_serial}.scene.{device.id}"
self._scene_map[device.id] = device
self.fibaro_devices["scene"].append(device)
_LOGGER.debug("%s scene -> %s", device.ha_id, device)

def _read_devices(self):
"""Read and process the device list."""
Expand All @@ -259,8 +260,10 @@ def _read_devices(self):
last_climate_parent = None
for device in devices:
try:
if "name" not in device or "id" not in device:
continue
device.fibaro_controller = self
if device.roomID == 0:
if "roomID" not in device or device.roomID == 0:
room_name = "Unknown"
else:
room_name = self._room_map[device.roomID].name
Expand Down