From 443ba52ab3f49a28e8874ebcb5476e36c3defb4c Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 26 Mar 2026 20:57:22 +0100 Subject: Add `Retain` attribute to MQTTMessage This allows the sending part of the code to decide about the retain flag. The MQTT go routine will set it accordingly. --- cache.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.go') diff --git a/cache.go b/cache.go index 4e0eddc..18ce0c9 100644 --- a/cache.go +++ b/cache.go @@ -43,6 +43,7 @@ func (c *Cache) Update(states States) { c.Tx <- MQTTMessage{ Topic: topic, Payload: payload, + Retain: true, } } c.States[id] = state -- cgit v1.3