I do that by sending the temperature via an MQTT message from the ESP to Node-Red every 5 seconds. No different from receiving the relay status from your Sonoff.
Am I misunderstanding your problem? What you’ve described here is quite a bit different from what you said earlier:
Pete.