Add Proximity Trigger for Vacation Mode

This commit is contained in:
2023-11-21 15:52:37 -07:00
parent 456d18d969
commit ed36ab28b8

View File

@@ -6,6 +6,17 @@ input_boolean:
vacation_mode: vacation_mode:
name: Vacation Mode name: Vacation Mode
input_number:
# Threshold for minimum distance to trigger vacation mode (set to 0 to disable)
vacation_proximity_threshold:
name: Vacation Proximity Threshold
mode: box
min: 0
max: 1000
initial: 250
step: 10
unit_of_measurement: km
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Vacation Automations # Vacation Automations
automation: automation:
@@ -17,6 +28,12 @@ automation:
- platform: state - platform: state
entity_id: alarm.alarm_control_panel entity_id: alarm.alarm_control_panel
to: armed_vacation to: armed_vacation
- platform: template
value_template: >-
{{
states('input_number.vacation_proximity_threshold')|default(0)|float > 0
and states('proximity.home')|default(0)|float >= states('input_number.vacation_proximity_threshold')|default(0)|float
}}
action: action:
- service: input_boolean.turn_on - service: input_boolean.turn_on
target: target: