Fix presence simulation activation flow
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
alias: Presence Simulation - Tidsblokke (realistisk)
|
||||
- alias: Presence Simulation - Tidsblokke (realistisk)
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
@@ -18,19 +18,19 @@ action:
|
||||
- variables:
|
||||
lights_morning:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.indkorsel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
- light.forgang
|
||||
|
||||
lights_midday:
|
||||
- light.kokken
|
||||
- light.indkoersel
|
||||
- light.livingroom
|
||||
|
||||
|
||||
lights_evening:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.indkorsel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
@@ -39,14 +39,12 @@ action:
|
||||
rand_music: "{{ range(0,100) | random }}"
|
||||
|
||||
- choose:
|
||||
|
||||
# 🌅 MORGEN
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "06:59:00"
|
||||
before: "12:00:00"
|
||||
sequence:
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_morning }}"
|
||||
sequence:
|
||||
@@ -87,14 +85,12 @@ action:
|
||||
target:
|
||||
entity_id: media_player.kokken
|
||||
|
||||
|
||||
# 🌤️ MIDDAG
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "11:59:00"
|
||||
before: "18:00:00"
|
||||
sequence:
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_midday }}"
|
||||
sequence:
|
||||
@@ -135,14 +131,12 @@ action:
|
||||
target:
|
||||
entity_id: media_player.kokken
|
||||
|
||||
|
||||
# 🌙 AFTEN
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "17:59:00"
|
||||
before: "22:30:00"
|
||||
sequence:
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_evening }}"
|
||||
sequence:
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
alias: Start Vacation Mode
|
||||
description: Aktiverer presence simulation ved feriestart og planlægger slutdato
|
||||
- alias: Vacation Mode - Start via dashboard
|
||||
description: Aktiverer presence simulation, når Vacation Mode tændes fra dashboardet
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "2026-03-28 14:00:00" # Ferie start
|
||||
- platform: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
to: "on"
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
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
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
alias: Vacation Mode - Recovery efter restart
|
||||
|
||||
- alias: Vacation Mode - Recovery efter restart
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
@@ -11,7 +10,6 @@ condition:
|
||||
|
||||
action:
|
||||
- choose:
|
||||
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
@@ -24,3 +22,7 @@ action:
|
||||
entity_id:
|
||||
- input_boolean.vacation_mode
|
||||
- input_boolean.presence_simulation
|
||||
default:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.presence_simulation
|
||||
|
||||
Reference in New Issue
Block a user