From d5476801168f5ea0e63d2aead5d12d9619767746 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 3 Jan 2023 18:25:15 -0700 Subject: [PATCH] Only replace topic (#4884) --- frigate/comms/mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/comms/mqtt.py b/frigate/comms/mqtt.py index 076b96608..e74cc6bf2 100644 --- a/frigate/comms/mqtt.py +++ b/frigate/comms/mqtt.py @@ -85,7 +85,7 @@ class MqttClient(Communicator): # type: ignore[misc] self, client: mqtt.Client, userdata: Any, message: mqtt.MQTTMessage ) -> None: self._dispatcher( - message.topic.replace(f"{self.mqtt_config.topic_prefix}/", ""), + message.topic.replace(f"{self.mqtt_config.topic_prefix}/", "", 1), message.payload.decode(), )