Use get_ffmpeg_manager instead of accessing hass.data directly in ring (#73374)
Use get_ffmpeg_manager intead of accessing hass.data directly in ring
This commit is contained in:
parent
297072c1f6
commit
51f88d3dad
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,6 @@ import requests
|
|||
|
||||
from homeassistant.components import ffmpeg
|
||||
from homeassistant.components.camera import Camera
|
||||
from homeassistant.components.ffmpeg import DATA_FFMPEG
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_ATTRIBUTION
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
@ -33,6 +32,7 @@ async def async_setup_entry(
|
|||
) -> None:
|
||||
"""Set up a Ring Door Bell and StickUp Camera."""
|
||||
devices = hass.data[DOMAIN][config_entry.entry_id]["devices"]
|
||||
ffmpeg_manager = ffmpeg.get_ffmpeg_manager(hass)
|
||||
|
||||
cams = []
|
||||
for camera in chain(
|
||||
|
@ -41,7 +41,7 @@ async def async_setup_entry(
|
|||
if not camera.has_subscription:
|
||||
continue
|
||||
|
||||
cams.append(RingCam(config_entry.entry_id, hass.data[DATA_FFMPEG], camera))
|
||||
cams.append(RingCam(config_entry.entry_id, ffmpeg_manager, camera))
|
||||
|
||||
async_add_entities(cams)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue