Templating a sensor into a text input help

Hi, I am tying to work on an automation to set the value of a text input to a sensor.


I’ve just started trying to use templates more, and just quit because of stuff like this. And advice or help for a beginner would be appreciated.
Thanks in advance

Post the full automation as text


alias: Thing
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.jiv_s_new_phone_detected_activity
condition: []
action:
  - service: input_text.set_value
    data:
      value: "{{states('sensor.jiv_s_new_phone_detected_activity'}}"
    target:
      entity_id: input_text.what_j
mode: single

The ending bracket is missing. It has to be

"{{ states('sensor.jiv_s_new_phone_detected_activity') }}"

Thanks, it works :slight_smile: