mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix onvif PTZ service freeze (#27250)
This commit is contained in:
parent
d39e320b9e
commit
8de942f00f
@ -23,7 +23,7 @@ from homeassistant.components.camera.const import DOMAIN
|
|||||||
from homeassistant.components.ffmpeg import DATA_FFMPEG, CONF_EXTRA_ARGUMENTS
|
from homeassistant.components.ffmpeg import DATA_FFMPEG, CONF_EXTRA_ARGUMENTS
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.aiohttp_client import async_aiohttp_proxy_stream
|
from homeassistant.helpers.aiohttp_client import async_aiohttp_proxy_stream
|
||||||
from homeassistant.helpers.service import extract_entity_ids
|
from homeassistant.helpers.service import async_extract_entity_ids
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -88,7 +88,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||||||
tilt = service.data.get(ATTR_TILT, None)
|
tilt = service.data.get(ATTR_TILT, None)
|
||||||
zoom = service.data.get(ATTR_ZOOM, None)
|
zoom = service.data.get(ATTR_ZOOM, None)
|
||||||
all_cameras = hass.data[ONVIF_DATA][ENTITIES]
|
all_cameras = hass.data[ONVIF_DATA][ENTITIES]
|
||||||
entity_ids = extract_entity_ids(hass, service)
|
entity_ids = await async_extract_entity_ids(hass, service)
|
||||||
target_cameras = []
|
target_cameras = []
|
||||||
if not entity_ids:
|
if not entity_ids:
|
||||||
target_cameras = all_cameras
|
target_cameras = all_cameras
|
||||||
|
Loading…
x
Reference in New Issue
Block a user