For a client, I have a JRL InControl Integration and an nmap-tracker and would like to automate, safely, opening the garage door and outside gate for arriving and departing.
The automations I have are as follows.
For Arriving, first automation to open the outside gate:
- id: '1588237098838'
alias: Gate_Open_Arrival_Script
description: ''
trigger:
- entity_id: device_tracker.iphone_tracker
event: enter
platform: zone
zone: zone.arrival_zone
condition:
- condition: state
entity_id: binary_sensor.outside_gate_permanent_open_sensor
state: 'off'
action:
- data: {}
service: script.announce_arrival_script
- data: {}
service: script.outside_gate_arrival_script
Then an automation to open the garage, but only if the previous automation triggered and it detects the WiFi of the car has arrived home:
- id: Garage_Open_Arrival_Script
alias: Garage_Open_Arrival_Script
description: ''
trigger:
- entity_id: device_tracker.jaguar_wifi
event: enter
platform: zone
zone: zone.gps_home
condition:
- condition: state
entity_id: binary_sensor.garage_door_sensor
state: 'off'
- condition: template
value_template: '"{{ ( as_timestamp(now()) - as_timestamp(state_attr(''automation.gate_open_arrival_script'',
''last_triggered'')) |int(0) ) > 120 }}" '
action:
- data: {}
service: script.garage_door_open_script
Then for departure, I’d like the outside gate to open if the car starts and the garage is open:
- id: Gate_Open_Departure_Script
alias: Gate_Open_Departure_Script
description: ''
trigger:
- entity_id: sensor.jaguar_i_pace_status
from: Key Removed
platform: state
to: Key On Engine Off
condition:
- condition: state
entity_id: binary_sensor.garage_door_sensor
state: open
action:
- data: {}
service: script.outside_gate_departure_open_script
- data: {}
service: script.announce_mom_departure_script
Unfortunately, these automations does not seem to work. Any advice?