Fix presence simulation activation flow

This commit is contained in:
2026-04-05 19:23:09 +02:00
parent bc706543b3
commit b68c4a3382
3 changed files with 190 additions and 198 deletions
+9 -15
View File
@@ -1,7 +1,7 @@
alias: Presence Simulation - Tidsblokke (realistisk) - alias: Presence Simulation - Tidsblokke (realistisk)
mode: restart mode: restart
trigger: trigger:
- platform: time - platform: time
at: "07:00:00" at: "07:00:00"
- platform: time - platform: time
@@ -9,28 +9,28 @@ trigger:
- platform: time - platform: time
at: "18:00:00" at: "18:00:00"
condition: condition:
- condition: state - condition: state
entity_id: input_boolean.presence_simulation entity_id: input_boolean.presence_simulation
state: "on" state: "on"
action: action:
- variables: - variables:
lights_morning: lights_morning:
- light.livingroom - light.livingroom
- light.indkoersel_2 - light.indkorsel_2
- light.andreas_vaerelse - light.andreas_vaerelse
- light.bedroom - light.bedroom
- light.daniels_vaerelse - light.daniels_vaerelse
- light.forgang - light.forgang
lights_midday: lights_midday:
- light.kokken - light.livingroom
- light.indkoersel
lights_evening: lights_evening:
- light.livingroom - light.livingroom
- light.indkoersel_2 - light.indkorsel_2
- light.andreas_vaerelse - light.andreas_vaerelse
- light.bedroom - light.bedroom
- light.daniels_vaerelse - light.daniels_vaerelse
@@ -39,14 +39,12 @@ action:
rand_music: "{{ range(0,100) | random }}" rand_music: "{{ range(0,100) | random }}"
- choose: - choose:
# 🌅 MORGEN # 🌅 MORGEN
- conditions: - conditions:
- condition: time - condition: time
after: "06:59:00" after: "06:59:00"
before: "12:00:00" before: "12:00:00"
sequence: sequence:
- repeat: - repeat:
for_each: "{{ lights_morning }}" for_each: "{{ lights_morning }}"
sequence: sequence:
@@ -87,14 +85,12 @@ action:
target: target:
entity_id: media_player.kokken entity_id: media_player.kokken
# 🌤️ MIDDAG # 🌤️ MIDDAG
- conditions: - conditions:
- condition: time - condition: time
after: "11:59:00" after: "11:59:00"
before: "18:00:00" before: "18:00:00"
sequence: sequence:
- repeat: - repeat:
for_each: "{{ lights_midday }}" for_each: "{{ lights_midday }}"
sequence: sequence:
@@ -135,14 +131,12 @@ action:
target: target:
entity_id: media_player.kokken entity_id: media_player.kokken
# 🌙 AFTEN # 🌙 AFTEN
- conditions: - conditions:
- condition: time - condition: time
after: "17:59:00" after: "17:59:00"
before: "22:30:00" before: "22:30:00"
sequence: sequence:
- repeat: - repeat:
for_each: "{{ lights_evening }}" for_each: "{{ lights_evening }}"
sequence: sequence:
+8 -12
View File
@@ -1,15 +1,11 @@
alias: Start Vacation Mode - alias: Vacation Mode - Start via dashboard
description: Aktiverer presence simulation ved feriestart og planlægger slutdato description: Aktiverer presence simulation, når Vacation Mode tændes fra dashboardet
trigger: trigger:
- platform: time - platform: state
at: "2026-03-28 14:00:00" # Ferie start entity_id: input_boolean.vacation_mode
action: to: "on"
action:
- service: input_boolean.turn_on - service: input_boolean.turn_on
target: target:
entity_id: input_boolean.presence_simulation entity_id: input_boolean.presence_simulation
# Planlæg slutdato automatisk
- delay:
days: 7
- service: input_boolean.turn_off
target:
entity_id: input_boolean.presence_simulation
+8 -6
View File
@@ -1,17 +1,15 @@
alias: Vacation Mode - Recovery efter restart - alias: Vacation Mode - Recovery efter restart
trigger:
trigger:
- platform: homeassistant - platform: homeassistant
event: start event: start
condition: condition:
- condition: state - condition: state
entity_id: input_boolean.vacation_mode entity_id: input_boolean.vacation_mode
state: "on" state: "on"
action: action:
- choose: - choose:
- conditions: - conditions:
- condition: template - condition: template
value_template: > value_template: >
@@ -24,3 +22,7 @@ action:
entity_id: entity_id:
- input_boolean.vacation_mode - input_boolean.vacation_mode
- input_boolean.presence_simulation - input_boolean.presence_simulation
default:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.presence_simulation