How do I update a dummy sensor from automation

Hi. I am pretty new to HA but still feel I have come a long way, but I’m struggling with how to update a dummy sensor from automation. I have ctreated a dummy sensor in configuration.yaml:

input_text:
  flightnumber_txt:
    name: actual_nbr

I have a entity card in lovelace which only shows unkown at startup.

In my automations.yaml I have this automation:

- alias: 'Flight entry notification'
  trigger:
    platform: event
    event_type: opensky_entry
  action:
     - service: notify.mobile_app_sm_n950f
       data:
         message: 'Flight entry of {{ trigger.event.data.callsign }}'
     - service: input_text.set_value
       data:
         entity_id: input_text.flightnumber_txt
         value: "{{ trigger.event.data.callsign }}"

The automation works fine. I get an notification in my HA app on my phone that show the correct flight number. The problem is that it doesn’t update the value of my sensor and in Lovelace the card only show unknown.

I hope someone are able to tell me what I’m doing wrong.

Thanks for your help.

It may pay to have a look in the log immediately after you run the automation to see if there is any clues in there.

Yes, I have done that, but there are no error messages there.

If your prior to 0.115 you’ll need to use data_template:

I just tried your automation (minus the notify part) and it sets the correct value on the input_text.

- alias: 'Flight entry notification'
  trigger:
    platform: event
    event_type: opensky_entry
  action:
     - service: notify.mobile_app_sm_n950f
       data:
         message: 'Flight entry of {{ trigger.event.data.callsign }}'
     - service: input_text.set_value
       data_template:
         entity_id: input_text.flightnumber_txt
         value: "{{ trigger.event.data.callsign }}"

Sorry for my late answer, but thanks for your efforts testing this. It’s Strange that it works for you. I’m on the latest version and it seems I’m not able to get it to work. Have to do some more investigation