Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions homeassistant/components/canary/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Canary alarms."""
data = hass.data[DATA_CANARY]
devices = []

for location in data.locations:
devices.append(CanaryAlarm(data, location.location_id))
devices = [CanaryAlarm(data, location.location_id) for location in data.locations]

add_entities(devices, True)

Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/canary/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Canary sensors."""
if discovery_info is not None:
return

data = hass.data[DATA_CANARY]
devices = []

Expand Down