Compare commits
2 Commits
0b4fc7f2f4
...
79eb860711
| Author | SHA1 | Date | |
|---|---|---|---|
| 79eb860711 | |||
| 14824b0ab7 |
@@ -0,0 +1,87 @@
|
||||
- id: forgang_motion_lys
|
||||
alias: Forgang lys via bevægelse
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.forgang_bevaegelse
|
||||
to: "on"
|
||||
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.forgang_sensor_illuminance
|
||||
below: 60
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "06:00:00"
|
||||
before: "23:59:00"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.forgang_bright
|
||||
default:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.forgang_dimmed
|
||||
|
||||
- id: forgang_motion_sluk_dag
|
||||
alias: Sluk forgang lys efter 10 min uden bevægelse
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.forgang_bevaegelse
|
||||
to: "off"
|
||||
|
||||
condition:
|
||||
- condition: time
|
||||
after: "06:00:00"
|
||||
before: "23:59:00"
|
||||
|
||||
action:
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.forgang_bevaegelse
|
||||
to: "on"
|
||||
timeout: "00:10:00"
|
||||
continue_on_timeout: true
|
||||
- condition: state
|
||||
entity_id: binary_sensor.forgang_bevaegelse
|
||||
state: "off"
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.forgang
|
||||
|
||||
- id: forgang_motion_sluk_nat
|
||||
alias: Sluk forgang lys efter 5 min uden bevægelse om natten
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.forgang_bevaegelse
|
||||
to: "off"
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: time
|
||||
before: "06:00:00"
|
||||
- condition: time
|
||||
after: "23:59:00"
|
||||
|
||||
action:
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.forgang_bevaegelse
|
||||
to: "on"
|
||||
timeout: "00:05:00"
|
||||
continue_on_timeout: true
|
||||
- condition: state
|
||||
entity_id: binary_sensor.forgang_bevaegelse
|
||||
state: "off"
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.forgang
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
alias: Presence Simulation - Tidsblokke (robust)
|
||||
alias: Presence Simulation - Tidsblokke (realistisk)
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
@@ -16,40 +16,57 @@ condition:
|
||||
|
||||
action:
|
||||
- variables:
|
||||
rand_delay: "{{ range(300,1200) | random }}" # 5-20 min
|
||||
lights_morning:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
- light.forgang
|
||||
|
||||
lights_midday:
|
||||
- light.kokken
|
||||
- light.indkoersel
|
||||
|
||||
lights_evening:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
- light.forgang
|
||||
|
||||
rand_music: "{{ range(0,100) | random }}"
|
||||
|
||||
- choose:
|
||||
|
||||
# 🌅 Morgen
|
||||
# 🌅 MORGEN
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "06:59:00"
|
||||
before: "12:00:00"
|
||||
sequence:
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_morning }}"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
- light.forgang
|
||||
entity_id: "{{ repeat.item }}"
|
||||
- delay:
|
||||
seconds: "{{ range(30,180) | random }}"
|
||||
|
||||
- delay:
|
||||
seconds: "{{ rand_delay }}"
|
||||
minutes: "{{ range(10,30) | random }}"
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_morning | reverse }}"
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
- light.forgang
|
||||
entity_id: "{{ repeat.item }}"
|
||||
- delay:
|
||||
seconds: "{{ range(20,120) | random }}"
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -64,37 +81,40 @@ action:
|
||||
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
||||
|
||||
- delay:
|
||||
seconds: "{{ range(300,900) | random }}"
|
||||
minutes: "{{ range(5,15) | random }}"
|
||||
|
||||
- service: media_player.media_stop
|
||||
target:
|
||||
entity_id: media_player.kokken
|
||||
|
||||
# 🌤️ Middag
|
||||
|
||||
# 🌤️ MIDDAG
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "11:59:00"
|
||||
before: "18:00:00"
|
||||
sequence:
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_midday }}"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id:
|
||||
- light.kokken
|
||||
- light.indkoersel
|
||||
entity_id: "{{ repeat.item }}"
|
||||
- delay:
|
||||
seconds: "{{ range(60,300) | random }}"
|
||||
|
||||
- delay:
|
||||
seconds: "{{ rand_delay }}"
|
||||
minutes: "{{ range(5,20) | random }}"
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_midday | reverse }}"
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
- light.forgang
|
||||
entity_id: "{{ repeat.item }}"
|
||||
- delay:
|
||||
seconds: "{{ range(30,180) | random }}"
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -109,42 +129,40 @@ action:
|
||||
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
||||
|
||||
- delay:
|
||||
seconds: "{{ range(300,900) | random }}"
|
||||
minutes: "{{ range(5,15) | random }}"
|
||||
|
||||
- service: media_player.media_stop
|
||||
target:
|
||||
entity_id: media_player.kokken
|
||||
|
||||
# 🌙 Aften
|
||||
|
||||
# 🌙 AFTEN
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "17:59:00"
|
||||
before: "22:30:00"
|
||||
sequence:
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_evening }}"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
- light.forgang
|
||||
|
||||
entity_id: "{{ repeat.item }}"
|
||||
- delay:
|
||||
seconds: "{{ range(20,120) | random }}"
|
||||
|
||||
- delay:
|
||||
seconds: "{{ rand_delay }}"
|
||||
minutes: "{{ range(15,60) | random }}"
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ lights_evening | reverse }}"
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- light.livingroom
|
||||
- light.indkoersel_2
|
||||
- light.andreas_vaerelse
|
||||
- light.bedroom
|
||||
- light.daniels_vaerelse
|
||||
- light.forgang
|
||||
entity_id: "{{ repeat.item }}"
|
||||
- delay:
|
||||
seconds: "{{ range(20,120) | random }}"
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -159,7 +177,7 @@ action:
|
||||
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
||||
|
||||
- delay:
|
||||
seconds: "{{ range(300,1200) | random }}"
|
||||
minutes: "{{ range(10,20) | random }}"
|
||||
|
||||
- service: media_player.media_stop
|
||||
target:
|
||||
|
||||
Reference in New Issue
Block a user