Storing value of MQTT message in a sensor

Is it possible to change the value of a template sensor from automation? I want to be able update it based on the value from an MQTT message?

If not, then what are my options. Basically I have another Pi which will be sending me the external VPN IP address. I’d like to store that somewhere for display on my homepage. input_text may be an option, but don’t want it editable

I think you want this; It is a sensor that listens for an MQTT topic and then saves the payload.

1 Like

I agree with @klogg here. MQTT Sensor is what you are looking for.

1 Like

Thanks for the quick response, that’s exactly what I was after.

I’ve only been using Home Assistant for a couple of weeks and I’m blown away by the flexibility.