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
|
mode: restart
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
@@ -16,40 +16,57 @@ condition:
|
|||||||
|
|
||||||
action:
|
action:
|
||||||
- variables:
|
- 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 }}"
|
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:
|
||||||
|
|
||||||
- service: light.turn_on
|
- repeat:
|
||||||
target:
|
for_each: "{{ lights_morning }}"
|
||||||
entity_id:
|
sequence:
|
||||||
- light.livingroom
|
- service: light.turn_on
|
||||||
- light.indkoersel_2
|
target:
|
||||||
- light.andreas_vaerelse
|
entity_id: "{{ repeat.item }}"
|
||||||
- light.bedroom
|
- delay:
|
||||||
- light.daniels_vaerelse
|
seconds: "{{ range(30,180) | random }}"
|
||||||
- light.forgang
|
|
||||||
|
|
||||||
- delay:
|
- delay:
|
||||||
seconds: "{{ rand_delay }}"
|
minutes: "{{ range(10,30) | random }}"
|
||||||
|
|
||||||
- service: light.turn_off
|
- repeat:
|
||||||
target:
|
for_each: "{{ lights_morning | reverse }}"
|
||||||
entity_id:
|
sequence:
|
||||||
- light.livingroom
|
- service: light.turn_off
|
||||||
- light.indkoersel_2
|
target:
|
||||||
- light.andreas_vaerelse
|
entity_id: "{{ repeat.item }}"
|
||||||
- light.bedroom
|
- delay:
|
||||||
- light.daniels_vaerelse
|
seconds: "{{ range(20,120) | random }}"
|
||||||
- light.forgang
|
|
||||||
|
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@@ -64,37 +81,40 @@ action:
|
|||||||
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
||||||
|
|
||||||
- delay:
|
- delay:
|
||||||
seconds: "{{ range(300,900) | random }}"
|
minutes: "{{ range(5,15) | random }}"
|
||||||
|
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
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:
|
||||||
|
|
||||||
- service: light.turn_on
|
- repeat:
|
||||||
target:
|
for_each: "{{ lights_midday }}"
|
||||||
entity_id:
|
sequence:
|
||||||
- light.kokken
|
- service: light.turn_on
|
||||||
- light.indkoersel
|
target:
|
||||||
|
entity_id: "{{ repeat.item }}"
|
||||||
|
- delay:
|
||||||
|
seconds: "{{ range(60,300) | random }}"
|
||||||
|
|
||||||
- delay:
|
- delay:
|
||||||
seconds: "{{ rand_delay }}"
|
minutes: "{{ range(5,20) | random }}"
|
||||||
|
|
||||||
- service: light.turn_off
|
- repeat:
|
||||||
target:
|
for_each: "{{ lights_midday | reverse }}"
|
||||||
entity_id:
|
sequence:
|
||||||
- light.livingroom
|
- service: light.turn_off
|
||||||
- light.indkoersel_2
|
target:
|
||||||
- light.andreas_vaerelse
|
entity_id: "{{ repeat.item }}"
|
||||||
- light.bedroom
|
- delay:
|
||||||
- light.daniels_vaerelse
|
seconds: "{{ range(30,180) | random }}"
|
||||||
- light.forgang
|
|
||||||
|
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@@ -109,42 +129,40 @@ action:
|
|||||||
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
||||||
|
|
||||||
- delay:
|
- delay:
|
||||||
seconds: "{{ range(300,900) | random }}"
|
minutes: "{{ range(5,15) | random }}"
|
||||||
|
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
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:
|
||||||
|
|
||||||
- service: light.turn_on
|
- repeat:
|
||||||
target:
|
for_each: "{{ lights_evening }}"
|
||||||
entity_id:
|
sequence:
|
||||||
- light.livingroom
|
- service: light.turn_on
|
||||||
- light.indkoersel_2
|
target:
|
||||||
- light.andreas_vaerelse
|
entity_id: "{{ repeat.item }}"
|
||||||
- light.bedroom
|
- delay:
|
||||||
- light.daniels_vaerelse
|
seconds: "{{ range(20,120) | random }}"
|
||||||
- light.forgang
|
|
||||||
|
|
||||||
|
|
||||||
- delay:
|
- delay:
|
||||||
seconds: "{{ rand_delay }}"
|
minutes: "{{ range(15,60) | random }}"
|
||||||
|
|
||||||
- service: light.turn_off
|
- repeat:
|
||||||
target:
|
for_each: "{{ lights_evening | reverse }}"
|
||||||
entity_id:
|
sequence:
|
||||||
- light.livingroom
|
- service: light.turn_off
|
||||||
- light.indkoersel_2
|
target:
|
||||||
- light.andreas_vaerelse
|
entity_id: "{{ repeat.item }}"
|
||||||
- light.bedroom
|
- delay:
|
||||||
- light.daniels_vaerelse
|
seconds: "{{ range(20,120) | random }}"
|
||||||
- light.forgang
|
|
||||||
|
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@@ -159,7 +177,7 @@ action:
|
|||||||
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
media_content_id: "spotify:playlist:37i9dQZF1EVHGWrwldPRtj"
|
||||||
|
|
||||||
- delay:
|
- delay:
|
||||||
seconds: "{{ range(300,1200) | random }}"
|
minutes: "{{ range(10,20) | random }}"
|
||||||
|
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
target:
|
target:
|
||||||
|
|||||||
Reference in New Issue
Block a user