mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix Onvif PTZ for Imou cameras (#56592)
This commit is contained in:
parent
6a266ae3c0
commit
0c1c1f7845
@ -373,10 +373,13 @@ class ONVIFDevice:
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
req.Velocity = {
|
velocity = {}
|
||||||
"PanTilt": {"x": pan_val, "y": tilt_val},
|
if pan is not None or tilt is not None:
|
||||||
"Zoom": {"x": zoom_val},
|
velocity["PanTilt"] = {"x": pan_val, "y": tilt_val}
|
||||||
}
|
if zoom is not None:
|
||||||
|
velocity["Zoom"] = {"x": zoom_val}
|
||||||
|
|
||||||
|
req.Velocity = velocity
|
||||||
|
|
||||||
await ptz_service.ContinuousMove(req)
|
await ptz_service.ContinuousMove(req)
|
||||||
await asyncio.sleep(continuous_duration)
|
await asyncio.sleep(continuous_duration)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user