Update garage automation to use device_tracker and add notifications
- Replace sensor.claus_distance_home with device_tracker.clausiphone (home/not_home) - Change triggers from numeric_state to state-based presence detection - Adjust active time window to 05:00–23:00 - Add push notifications to mobile_app_clausiphone15 on garage open/close
This commit is contained in:
@@ -1,29 +1,31 @@
|
|||||||
- id: garage_auto_claus_distance
|
- id: garage_auto_claus_presence
|
||||||
alias: Garage auto Claus
|
alias: Garage auto Claus
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: numeric_state
|
- platform: state
|
||||||
entity_id: sensor.claus_distance_home
|
entity_id: device_tracker.clausiphone
|
||||||
below: 40
|
to: "home"
|
||||||
id: arriving
|
id: arriving
|
||||||
|
|
||||||
- platform: numeric_state
|
- platform: state
|
||||||
entity_id: sensor.claus_distance_home
|
entity_id: device_tracker.clausiphone
|
||||||
above: 60
|
from: "home"
|
||||||
|
to: "not_home"
|
||||||
id: leaving
|
id: leaving
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
- condition: time
|
- condition: time
|
||||||
after: "05:30:00"
|
after: "05:00:00"
|
||||||
before: "22:30:00"
|
before: "23:00:00"
|
||||||
|
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: device_tracker.snowywhite_location_tracker
|
entity_id: device_tracker.snowywhite_location_tracker
|
||||||
state: "home"
|
state: "home"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
|
|
||||||
# ÅBN
|
# ÅBN (Arriving)
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: arriving
|
id: arriving
|
||||||
@@ -35,7 +37,11 @@
|
|||||||
target:
|
target:
|
||||||
entity_id: cover.anne
|
entity_id: cover.anne
|
||||||
|
|
||||||
# LUK
|
- service: notify.mobile_app_clausiphone15
|
||||||
|
data:
|
||||||
|
message: "Garage opened (arrival detected)"
|
||||||
|
|
||||||
|
# LUK (Leaving)
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: leaving
|
id: leaving
|
||||||
@@ -47,5 +53,9 @@
|
|||||||
target:
|
target:
|
||||||
entity_id: cover.anne
|
entity_id: cover.anne
|
||||||
|
|
||||||
|
- service: notify.mobile_app_clausiphone15
|
||||||
|
data:
|
||||||
|
message: "Garage closed (departure detected)"
|
||||||
|
|
||||||
mode: single
|
mode: single
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user