Fix Onvif PTZ for Imou cameras (#56592)
This commit is contained in:
parent
6a266ae3c0
commit
0c1c1f7845
1 changed files with 7 additions and 4 deletions
|
@ -373,10 +373,13 @@ class ONVIFDevice:
|
|||
)
|
||||
return
|
||||
|
||||
req.Velocity = {
|
||||
"PanTilt": {"x": pan_val, "y": tilt_val},
|
||||
"Zoom": {"x": zoom_val},
|
||||
}
|
||||
velocity = {}
|
||||
if pan is not None or tilt is not None:
|
||||
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 asyncio.sleep(continuous_duration)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue