Change Helper Value on automation

Newbie here!
I am looking if it’s possible to change the value of helper “text” from something to something else when automation is triggered.

For Example, When Automation A is triggered the value in the helper will be “That happened” and when Automation B is triggered later, the value will switch to " this happened"

would appreciate if someone can help me knowing how to achieve this

1 Like

Hi, you can call the set_value service with the entity_id and value, you want to set.

1 Like

You can also use the automation_triggered event:


trigger:
  - platform: event
    event_type: automation_triggered
    event_data:
      entity_id: automation.do_something_a
  - platform: event
    event_type: automation_triggered
    event_data:
      entity_id: automation.do_something_ b
condition: []
action:
  - service: input_text.set_value
    data:
      value: |
        Automation {{ trigger.event.data['name'] }} ({{trigger.event.data['entity_id'] }}) has been triggered
    target:
      entity_id: input_text.target

Output:

Automation Do something A (automation.do_something_a) has been triggered

1 Like

This type or helper is clear. But how can I set a value of a template sensor/helper? And can I even set an attribute value?

Do you mean something like this?

How to do this

1 Like