So I try to show each run automation in the frontend, for which I have a python script (thank you @petro for rebuilding my script called after each run script), which works fine. The thing is the automation doesnt work as expected (or so i think…)
It does get triggered when I manually trigger an automation in the dev-tools, or have a switch flipped that turns on or Off an automation.
It doesn’t trigger when an automation gets triggered based on the trigger of that automation. Which is the point in the first place…
Please check with me why below automation this would be wrong (never mind the notify, which is only there now for testing purposes to see if the message itself is correctly formatted):
## Call Last Automation after each automation
- alias: 'Call Service Event (Automation)'
id: 'Call Service Event (Automation)'
hide_entity: True
initial_state: 'on'
trigger:
platform: event
event_type: call_service
event_data:
domain: automation
service: trigger
action:
- delay: 00:00:02
- service: notify.notify
data_template:
message: "{{ trigger.event }}"
- service: python_script.last_automation
data_template:
event: "{{ trigger.event }}"
and why this automation doing the same for Scripts does work perfectly:
# Call Last command after each script
- alias: 'Call Service Event (Script)'
id: 'Call Service Event (Script)'
# hide_entity: True
initial_state: 'on'
trigger:
platform: event
event_type: call_service
event_data:
domain: script
action:
- delay: 00:00:02
- service: python_script.last_cmd
data_template:
event: "{{ trigger.event }}"
thanks,
Marius