been told one can add extra conditions after an action, to have a next conditional action.
trying to setup I have several correct yaml automations that wont pass the Hassio parser…
please help me in correcting this: desired order: get a (unconditional) message when wife is coming home, and, following that, condition: if the boolean is on, action: announce it over the notify.ios
- alias: Wife came Home
id: '1511601478134'
trigger:
platform: zone
event: enter
zone: zone.home
entity_id: device_tracker.iphone
condition: []
action:
service: notify.notify
data:
message: Wife came home
condition:
condition: state
entity_id: input_boolean.notify_announcement
state: 'on'
action:
- service: notify.ios_telefoonmhb
data_template:
title: "Activity Speech"
message: "Please listen"
data:
push:
sound: US-EN-Morgan-Freeman-Wife-Is-Arriving.wav
think the issue is the multiple actions, you can only have 1.
So it would go like this:
action:
service: notify.notify
data:
message: Wife came home
condition: state
entity_id: input_boolean.notify_announcement
state: 'on'
service: notify.ios_telefoonmhb
data_template:
title: "Activity Speech"
message: "Please listen"
data:
push:
sound: US-EN-Morgan-Freeman-Wife-Is-Arriving.wav
Note I’m not doing this from my usual computer so the indentation is most likely messed up, but hopefully you get the idea…
The way it works is it will run each step under action in order as long as each condition in between is true. If one condition is false, the automation will stop/end and all following actions will not run
If i want the friendly name of the triggering device in the title or message, what would be the correct syntax for that template? Something like " {{states.triggering_device.attributes.friendly_name}} arrived home"
It’s a combined trigger. your device and the zone are both triggers.
Anyway, this is how I’ve got it with exactly your same type of trigger and it works.
thanks! ive setup accordingly, will see what happens tomorrow
not much documentation on this subject though, zoning and templating. Any suggestions for that you might have would be appreciated. Next to this of course: Automation trigger variables - Home Assistant