fix presence

This commit is contained in:
2026-03-25 21:06:57 +01:00
parent bef3fc5b4c
commit 0b4fc7f2f4
4 changed files with 124 additions and 54 deletions
+6 -6
View File
@@ -1,4 +1,5 @@
alias: Vacation Mode - Recovery efter restart
trigger:
- platform: homeassistant
event: start
@@ -10,17 +11,16 @@ condition:
action:
- choose:
# Hvis slutdato allerede er passeret → sluk med det samme
- conditions:
- condition: template
value_template: "{{ now() >= states('input_datetime.vacation_end') | as_datetime }}"
value_template: >
{% set dt = states('input_datetime.vacation_end') %}
{{ dt not in ['unknown','unavailable',''] and
now() >= as_datetime(dt) }}
sequence:
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.vacation_mode
- input_boolean.presence_simulation
# Ellers → gør ingenting (time trigger tager over)
- conditions: []
sequence: []