Looking for a sample to publish an Entity value to MQTT

Needless to say… I’m a Noob. Have searched and tried to change some examples to suit my need but just can’t wrap my head around it yet.
I want to publish the value of HA Entity ID: sensor.airlink_temperature to MQTT based on value changing or at a fixed time interval. Ultimate destination is Indigo but my stumbling block is getting it to MQTT.
I have Node-Red installed but have not found an easy enough example flow to follow, yet. I do have a test string being published but nothing dynamic yet.
I’m using MQTT Explorer to test data being published so I think I have the transport working ok.
I’ll keep searching/trying but thought I’d ask here too.

This yaml (should convert to visual). Takes anything added to a text item called input_text.mqttwarn_info and publishes it to topic: homeassistant/notification/info

alias: MQTT publish Info
description: Send info string to mqtt warn
trigger:
  - platform: state
    entity_id: input_text.mqttwarn_info
condition: []
action:
  - service: mqtt.publish
    data:
      topic: homeassistant/notification/info
      payload_template: "{{ states('input_text.mqttwarn_info') }}"
mode: single

You should be able to adapt that pretty readily

1 Like

Thank you. Attempting to muddle through. Should I be able to paste this snippet into my configuration.yawl? I tried but get errors so I’m probably doing something wrong.