This is the automation that I’m using when I arrive at home… if I take out the condition statement no errors, when I put it back in I get an error…
Am I missing something very simple here? I’ve looked all over and find examples that look identical…
- alias: 16 - Arrival Home
id: Getting home
trigger:
- platform: state
entity_id: binary_sensor.front_door_motion_occupancy
to: "on"
condition:
- platform: state
entity_id: device_tracker.sm_f926u1
to: "home"
error:
Invalid config for [automation]: [to] is an invalid option for [automation]. Check: automation->condition->0->to. (See /config/configuration.yaml, line 79).
Now I want to pick your brain… The automation works great now, Thank you but how would you
get this working so it only actually works once when you walk in the door and doesn’t work everytime you trip the sensor?
- alias: 16 - Arrival Home
id: Getting home
trigger:
- platform: state
entity_id: binary_sensor.front_door_motion_occupancy
from: "off"
to: "on"
condition:
condition: and
conditions:
- condition: state
entity_id: device_tracker.sm_f926u1
state: home
- condition: state
entity_id: input_boolean.notify_home
state: 'on'
action:
- service: tts.cloud_say
entity_id: media_player.sonos_five
data_template:
message: >
{{ ('Great to have you home name, is there anything I can do for you?',
'Hello name.. what is thy bidding?','Hi name, the dog has been a terror all day.',
'name, where have you been all day?'
)|random | replace("name", "John", "Master", "Johnnyboy")| random) }}
- service: input_boolean.turn_off
entity_id: input_boolean.notify_home
SO to trip that I added it in two places… one in my door lock to turn if ‘off’ and the other in my door unlock automation to turn it ‘on’, then back ‘off’ after it runs when I get home… [ Yeah I know it’s a mess with single and double quotes all over the place… gotta clean all that up but it should work].