How can i manualy add a service/entity to a device?

Hi there,

I’m really confused, since I’m trying to do something with services for the first time.

My Onvif integration is not showing PTZ controls for one type of my cams.
But i know they work, because i went to Dev Tools- > Services and created this:

service: onvif.ptz
data:
  distance: 0.1
  speed: 0.5
  continuous_duration: 0.5
  preset: "0"
  move_mode: ContinuousMove
  tilt: DOWN
target:
  entity_id: camera.cam1_profile000_mainstream

And it worked.

But now I don’t know, how to add this to my device, so I can use it from there?
Also, i want to be able to call it from some automations?
Can anybody explain how and where I have to add it to my configurations files, so I can use it with all cams of this type?

Thank you!

AFAIK, device menus are not user-editable.

If you are using the UI Automation editor, select “Call Service” as the action type then enter the information just like did in the Services tool.