I created some MQ posts with retain=false. After testing I decided to make some to be retained and set the retain flag to true. Despite reloading the YAML, reloading HA and even rebooting, the posts are not being retained. I’m not sure what the issue is. I have other posts that are being retained - also created in YAML. I am long term user of MQTT although a somewhat new user of HA. The Mosquito server is on a separate Linux box on the same sub-net and is problem free. The webhook is forwarded by Nebu Casa and is properly formatted. Here is a portion of the YAML definition - the full definition is much larger but just repeats this pattern. Suggestions appreciated.
- id: "mh_environment_refresh"
alias: MH Environment Refresh
description: "Webhook from MH with temp/hum values"
trigger:
- platform: webhook
allowed_methods:
- POST
- PUT
local_only: false
webhook_id: <hidden>
action:
- service: mqtt.publish
data:
qos: 0
retain: true
topic: Motorhome/Environment/Coach
payload: "{{ trigger.json.environment.CoachTemp }}"
- service: mqtt.publish
data:
qos: 0
retain: true
topic: Motorhome/Environment/Hum
payload: "{{ trigger.json.environment.CoachHum }}"