Text input from lovelace to notered (MQTT)

Hi all,

I’m new to Home Assistant - but have already made a lot of great improvements.
However - i struggle a bit with some of the fundamentals.

A thing I’ve tried to figure out for quite a while, is the possibility to send text to node-red (for announcements). I’m using the “custom:text-input-row” combined with MQTT - as I use it for other purposes.

My lovelace info looks as this:

type: entities
entities:
  - entity: input_text.announcement_text
    type: 'custom:text-input-row'
  - type: call-service
    name: ' '
    icon: 'mdi:voice'
    action_name: Annoncér det!
    service: mqtt.publish
    service_data:
      payload: input_text.announcement_text
      qos: 0
      retain: 0
      topic: announce_test

The thing I cant figure out, is how to get the “input_text.announcement_text” to the payload line?

Can anyone help?

You dont need to publish anything with mqtt to get the state of input_text.announcement_text, you just need to use the event state node which will output the state as a payload.

Ok, but I cant see the input_text.announcement_text as an enity in node red.
I know I am missing some basic knowledge here :slight_smile:

If you havent restarted the node red after creating the nput_text.announcement_text, it wont be be seen in auto population window but if you type it there, it will work. Or else you can just restart node red and the nput_text.announcement_text will be seen. It is same for all new entities almost all the time