Fix Canary KeyError: 'ffmpeg_arguments' (#35158)
This commit is contained in:
1 parent
7284f4e7ca
commit
96a998ad25
2 files changed
+4
-4
No files matched your search
@@ -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 = []
|
||||
|
||||
|
||||
Reference in new issue
Block a user