mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +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):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the Canary alarms."""
|
"""Set up the Canary alarms."""
|
||||||
data = hass.data[DATA_CANARY]
|
data = hass.data[DATA_CANARY]
|
||||||
devices = []
|
devices = [CanaryAlarm(data, location.location_id) for location in data.locations]
|
||||||
|
|
||||||
for location in data.locations:
|
|
||||||
devices.append(CanaryAlarm(data, location.location_id))
|
|
||||||
|
|
||||||
add_entities(devices, True)
|
add_entities(devices, True)
|
||||||
|
|
||||||
|
@ -29,6 +29,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the Canary sensors."""
|
"""Set up the Canary sensors."""
|
||||||
|
if discovery_info is not None:
|
||||||
|
return
|
||||||
|
|
||||||
data = hass.data[DATA_CANARY]
|
data = hass.data[DATA_CANARY]
|
||||||
devices = []
|
devices = []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user