Skip to content

NVR with realtime local object detection for IP cameras

Ptz cleanup (#6999)

Nicolas Mowend0891e518338
diff --git a/docs/docs/integrations/mqtt.md b/docs/docs/integrations/mqtt.md
index 229285676b..378eadb3ed 100644
--- a/docs/docs/integrations/mqtt.md
+++ b/docs/docs/integrations/mqtt.md
@@ -184,7 +184,7 @@ Topic to send PTZ commands to camera.
| Command | Description |
| ---------------------- | ----------------------------------------------------------------------------------------- |
-| `preset-<preset_name>` | send command to move to preset with name `<preset_name>` |
+| `preset_<preset_name>` | send command to move to preset with name `<preset_name>` |
| `MOVE_<dir>` | send command to continuously move in `<dir>`, possible values are [UP, DOWN, LEFT, RIGHT] |
| `ZOOM_<dir>` | send command to continuously zoom `<dir>`, possible values are [IN, OUT] |
| `STOP` | send command to stop moving |
diff --git a/frigate/comms/dispatcher.py b/frigate/comms/dispatcher.py
index 1c9105ce87..c8f90bad1e 100644
--- a/frigate/comms/dispatcher.py
+++ b/frigate/comms/dispatcher.py
@@ -253,7 +253,7 @@ class Dispatcher:
try:
if "preset" in payload.lower():
command = OnvifCommandEnum.preset
- param = payload.lower().split("-")[1]
+ param = payload.lower()[payload.index("_") + 1 :]
else:
command = OnvifCommandEnum[payload.lower()]
param = ""