mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix Canary KeyError: 'ffmpeg_arguments' (#35158)
This commit is contained in:
parent
7284f4e7ca
commit
96a998ad25
@ -24,10 +24,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
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)
|
||||
|
||||
|
@ -29,6 +29,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
||||
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 = []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user