From 8e1cdb313d49ccec628a2dc04b6f4983494804f3 Mon Sep 17 00:00:00 2001 From: Jeff Culverhouse Date: Sat, 8 Nov 2025 20:18:17 -0500 Subject: [PATCH] chore: minor fixes --- .trivyignore | 2 +- src/amcrest2mqtt/mixins/publish.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.trivyignore b/.trivyignore index 8188d8b..0efa269 100644 --- a/.trivyignore +++ b/.trivyignore @@ -1,3 +1,3 @@ # libexpat is only pulled in via apt-get install git during build. -# It is not used in the final runtime image or by blink2mqtt at all. +# It is not used in the final runtime image or by amcrest2mqtt at all. CVE-2025-59375 diff --git a/src/amcrest2mqtt/mixins/publish.py b/src/amcrest2mqtt/mixins/publish.py index c3301ed..5766aa0 100644 --- a/src/amcrest2mqtt/mixins/publish.py +++ b/src/amcrest2mqtt/mixins/publish.py @@ -170,6 +170,8 @@ class PublishMixin: if sub and k != sub: continue topic = self.mqtt_helper.stat_t(device_id, state, k) + if isinstance(v, list): + v = json.dumps(v) await asyncio.to_thread(self.mqtt_helper.safe_publish, topic, v, retain=True) else: topic = self.mqtt_helper.stat_t(device_id, state)