Hi All,
If this is in the wrong place or is not formatted correctly, please let me know, it’s my first post.
I’m trying to automate my garage to open and close when I leave for work in the morning. I leave at about the same time every morning (~7:30am) but I’d like it to only do so during the week (mon-fri) and when I’m actually home. For some reason the automation below does not work and I’m not sure why.
- alias: 'Morning garage cycle'
hide_entity: false
trigger:
platform: time
hours: 7
minutes: 20
seconds: 0
condition:
condition: and
conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: danny.device_tracker
state: home
action:
- service: homeassistant.turn_on
entity_id: script.morning_garage
I use this configuration to open and close the garage routinely:
- alias: Open and close garage upon arrival
initial_state: 'on'
hide_entity: false
trigger:
- platform: state
entity_id: device_tracker.danny
from: 'not_home'
to: 'home'
- platform: state
entity_id: device_tracker.christina
from: 'not_home'
to: 'home'
condition:
- condition: time
before: '23:59:00'
action:
service: homeassistant.turn_on
entity_id: script.garage_trip_cycle
Any help would be great. Thanks