If-else in automation action (aka service template)

if have 2 automation which are running triggered by the home or not_home changes of a group.
on powering up the server i run an automation which checks various things. One of the is the location of the group based upon something similar to this should happen:

if group == not_home
  run automation A
if group == home
  run automation B

any ideas how this should be done? i tried a few combinations but it seemes i haven’t had my morning coffee yet…

Use the new choose action: https://www.home-assistant.io/docs/scripts/#choose-a-group-of-actions

1 Like

how on earth did i miss that? thanks mate!

It was only introduced recently (v0.113).