Dears experts!
I’ve a problem how to setup automations depend of source of event. I means really example situation:
I’ve a Shelly device with physical button. It was integrated and working fine. I want to have checking what was a trigger of device to “off”. Below automatization working independent of source triggering action:
It’s means - I can turn on/off by the wall switch or by the HA button. I want to have automatization which behavior will depend of source off trigger action. In logbook looks like:
by wall button - “Shelly hol turned off”
by HA interface - “Shelly hol turned off by Kris”
by automatization: - “Shelly hol turned off by Auto_1: turn off when no motion detected”
How to modify automations to react only when ie. user or other automations was trigger action?
Yes but to perform those actions I need to know what the exact context for each method is. If you are not willing to provide that information then I can’t help you.
Maybe will simplest, when I explain what I exactly want to achieve
If turn off by wall switch (default) → send notifications
If turn off by Kris (user) → send notification and turn on automation_1
if turn off by automation_AD → send notification and turn on automation_2
It seems something like “options” in actions section.
I understand what you want but if you do not provide the information I requested I cant help you.
I need you to trigger the automation by each of the three methods and post the resultant message that contains {{ trigger.to_state.context.user_id }} here.
Then when I know what the context.user_id is for each of those trigger methods I can show you how to implement the automations you want.