Pass on entity state to a service call

Hi,

I’m trying to pass on a state of a input box to a service, used the following code

entities:
  - entity: input_text.task_title
    type: 'custom:text-input-row'
  - action_name: Add Chore
    icon: 'mdi:voice'
    name: ' '
    service: gtasks.new_task
    service_data:
      task_title: {{states.input_text.task_title.state}}
      tasks_list: Chores
    type: call-service
type: entities

When i hit save it saves it but changes the code to this

entities:
  - entity: input_text.task_title
    type: 'custom:text-input-row'
  - action_name: Add Chore
    icon: 'mdi:voice'
    name: ' '
    service: gtasks.new_task
    service_data:
      task_title:
        '[object Object]': null
      tasks_list: Chores
    type: call-service
type: entities

Does a way to pass on the state of a entity exist? either through hass or node-red?

Any help would be greatly apprenticed.

Thanks

I’d suggest you call a script, and have the script handle that

I tried doing that, but the same thing happens… where it goes

'[object Object]': null

Thanks

    service: script.gtasks_new_task

script.gtasks_new_task:

  message_temperature:
    sequence:
      - service: gtasks.new_task
        data_template:
          task_title: "{{ states('input_text.task_title') }}"
          tasks_list: Chores

1 Like

Thank you so much, this has been racking my head for days…