MQTT / ESPHome: on_message

Apologies for this very simple question. I’m trying to use MQTT on_message to allow OTA updates when using deep_sleep mode. This question is more about how MQTT works I think but if I use node_red to inject the retained message on the specified topic (e.g. “softener/ota_mode”) do I need to address that message somehow to my esphome sensor OR will the sensor, by me specifying it in the ESP home configuration, go find it in MQTT broker?

Hope that makes sense