MQTT Retain does not seem to work for binary sensors

Hi, I’m a new user on 2022.4.6 in a container using Node Red for automation.

I have a problem making door sensor states over a HA restart.

Here is a screen clip before a restart

image

and here it is after a HA restart

image

Here is the definition in configuration.yaml

#Utility
  - platform: mqtt
    name: "Side Door"
    state_topic: "home/SideDoor"
    device_class: door    
    qos: 1  

and here is the door closed MQTT message copy/pasted from the debug log

28/05/2022, 11:14:20  node: 0f5378cd9a30f893
home/SideDoor : msg : Object
object
topic: "home/SideDoor"
payload: "OFF"
qos: 0
retain: "true"
_msgid: "46023c440a94836c"

My understanding is that the retain flag should mean that HA comes up with the correct state.

Am I doing anything wrong?

Thanks!

Not sure how to close this, but for some reason it now seems to work!

SMH!