From c38889c641f2e322123e6dcd18c91f44f241122a Mon Sep 17 00:00:00 2001 From: mrlt8 <67088095+mrlt8@users.noreply.github.com> Date: Sat, 11 May 2024 07:31:06 -0700 Subject: [PATCH] Remove retain flag from commands #1182 --- app/wyzebridge/mqtt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/wyzebridge/mqtt.py b/app/wyzebridge/mqtt.py index 9d2d6729..2ae3b8ad 100644 --- a/app/wyzebridge/mqtt.py +++ b/app/wyzebridge/mqtt.py @@ -123,7 +123,7 @@ def publish_messages(messages: list) -> None: @mqtt_enabled -def publish_topic(topic: str, message=None, retain=True): +def publish_topic(topic: str, message=None, retain=False): paho.mqtt.publish.single( topic=f"{MQTT_TOPIC}/{topic}", payload=message, @@ -151,7 +151,7 @@ def update_preview(cam_name: str): with contextlib.suppress(FileNotFoundError): img_file = f"{IMG_PATH}{cam_name}.{env_bool('IMG_TYPE','jpg')}" with open(img_file, "rb") as img: - publish_topic(f"{cam_name}/image", img.read()) + publish_topic(f"{cam_name}/image", img.read(), True) @mqtt_enabled