I’m using smartthings MQTT Bridge and recently upgraded to 0.77.3. After upgrading the retain flags don’t seem to be working for certain devices. When I turn on a “light” device, nothing happens. But if I change the dimmer level or tell Alexa to “turn the light to 50%” everything works fine. I suspect the cause is that home assistant isn’t retaining the previous state. This problem doesn’t occur when I use a “switch” device, nor does it occur if I use a “light” device that doesn’t use MQTT (i.e. Philips hue). It only occurs when I use a “light” device using MQTT via smartthings. Any thoughts? Could this just have been broken with the latest release?
The retained state of an MQTT message is stored in the mosquitto database, so does not have anything to do with the release of HA.
You can check to see if the message is retained in the database by subscribing to the broker using the universal topic #
, and seeing if the message is sent back by the broker. For instance
mosquitto_sub -t "#" -v
will print out all messages retained by the broker.