I am trying to publish state of the sensor to mqtt. My sensor is defined in ESPHOME and I get sensor state values to HA. See values in the log as well as can create graph, see current state in HA.
I would like to send value to mqtt as well, so I tried to use various syntax, so far without success. This is what I tried, but in all cases I receive text (whatever is after payload: ), not value into mqtt broker.