Use vehicle speed attribute to control garage opening
- Only open garage if SnowyWhite tracker has valid speed attribute - Prevents false triggers when car is asleep (speed = unknown) - Ensures garage opens only when arriving by car, not bike or foot
This commit is contained in:
@@ -17,22 +17,22 @@
|
|||||||
after: "05:00:00"
|
after: "05:00:00"
|
||||||
before: "23:00:00"
|
before: "23:00:00"
|
||||||
|
|
||||||
- condition: not
|
|
||||||
conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: device_tracker.snowywhite_location_tracker
|
|
||||||
state: "not_home"
|
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
|
|
||||||
# ÅBN (Arriving)
|
# ÅBN (kun hvis bil er aktiv)
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: arriving
|
id: arriving
|
||||||
|
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: cover.anne
|
entity_id: cover.anne
|
||||||
state: "closed"
|
state: "closed"
|
||||||
|
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ state_attr('device_tracker.snowywhite_location_tracker', 'speed') not in [None, 'unknown'] }}
|
||||||
|
|
||||||
sequence:
|
sequence:
|
||||||
- service: cover.open_cover
|
- service: cover.open_cover
|
||||||
target:
|
target:
|
||||||
@@ -40,15 +40,17 @@
|
|||||||
|
|
||||||
- service: notify.mobile_app_clausiphone15
|
- service: notify.mobile_app_clausiphone15
|
||||||
data:
|
data:
|
||||||
message: "Garage opened (arrival detected)"
|
message: "Garage opened (arrival by car)"
|
||||||
|
|
||||||
# LUK (Leaving)
|
# LUK (uændret logik)
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: leaving
|
id: leaving
|
||||||
|
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: cover.anne
|
entity_id: cover.anne
|
||||||
state: "open"
|
state: "open"
|
||||||
|
|
||||||
sequence:
|
sequence:
|
||||||
- service: cover.close_cover
|
- service: cover.close_cover
|
||||||
target:
|
target:
|
||||||
@@ -59,4 +61,3 @@
|
|||||||
message: "Garage closed (departure detected)"
|
message: "Garage closed (departure detected)"
|
||||||
|
|
||||||
mode: single
|
mode: single
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user