mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 11:00:14 -04:00
21 lines
596 B
YAML
21 lines
596 B
YAML
initial_state: "on"
|
|
alias: "Clint changing zones"
|
|
id: automation_clint_changing_zones
|
|
#description:
|
|
trigger:
|
|
# Been away for a few minutes
|
|
- platform: state
|
|
entity_id: device_tracker.pixel_10_pro
|
|
to: "not_home"
|
|
for: "00:05:00"
|
|
# Arrived in a zone
|
|
- platform: state
|
|
entity_id: device_tracker.pixel_10_pro
|
|
from: "not_home"
|
|
condition:
|
|
# Been at least 5 minutes
|
|
- condition: template
|
|
value_template: "{{ ( as_timestamp(now()) - as_timestamp(state_attr('script.clint_traveltime','last_triggered'))|float)|float > 300 }}"
|
|
action:
|
|
- action: script.clint_traveltime
|