Compare commits
14 Commits
5bffdbab78
...
380353c44e
| Author | SHA1 | Date | |
|---|---|---|---|
| 380353c44e | |||
| 904405237d | |||
| 9214d3daea | |||
| 9baac7742f | |||
| fae90550ca | |||
| f56e1a3196 | |||
| 3d589ba739 | |||
| d5c2a9cabb | |||
| 685764f7ae | |||
| 2cb9c552d6 | |||
| 73dae481bd | |||
| e2c0cb04d6 | |||
| 1b6cd33f87 | |||
| 6961ebff7e |
@@ -15,12 +15,12 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "S" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på bagdøren
|
||||
message: Det ringer på bagdøren old
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
data:
|
||||
message: Det ringer på bagdøren
|
||||
message: Det ringer på bagdøren old
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -92,6 +92,46 @@
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://media_source
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.8
|
||||
target:
|
||||
entity_id: media_player.andreas
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.andreas
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/doorbell.mp3
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: doorbell.mp3
|
||||
thumbnail:
|
||||
media_class: music
|
||||
children_media_class:
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://media_source
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.8
|
||||
target:
|
||||
entity_id: media_player.daniel
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.daniel
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/doorbell.mp3
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: doorbell.mp3
|
||||
thumbnail:
|
||||
media_class: music
|
||||
children_media_class:
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://media_source
|
||||
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
@@ -100,7 +140,7 @@
|
||||
media_content_id: media-source://tts/google_translate?message=der+er+nogen+der+ringer+p%C3%A5%0A
|
||||
media_content_type: provider
|
||||
metadata:
|
||||
title: 'der er nogen der ringer på
|
||||
title: 'der er nogen der ringer på bagdøren
|
||||
|
||||
'
|
||||
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
|
||||
@@ -131,7 +171,7 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "SS" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på bagdøren - doublepress
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
@@ -200,7 +240,7 @@
|
||||
media_content_id: media-source://tts/google_translate?message=der+er+nogen+der+ringer+p%C3%A5%0A
|
||||
media_content_type: provider
|
||||
metadata:
|
||||
title: 'der er nogen der ringer på
|
||||
title: 'der er nogen der ringer på bagdøren
|
||||
|
||||
'
|
||||
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
|
||||
@@ -217,7 +257,7 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "SSS" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på bagdøren - triple-press
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
@@ -303,7 +343,7 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "L" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på bagdøren - long-press
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "SS" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på bagdøren - doublepress
|
||||
message: Det ringer på bagdøren (2) - doublepress
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
data:
|
||||
message: Det ringer på bagdøren - doublepress
|
||||
message: Det ringer på bagdøren (2) - doublepress
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
@@ -88,6 +88,46 @@
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://media_source
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.8
|
||||
target:
|
||||
entity_id: media_player.andreas
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.andreas
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/doorbell.mp3
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: doorbell.mp3
|
||||
thumbnail:
|
||||
media_class: music
|
||||
children_media_class:
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://media_source
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.8
|
||||
target:
|
||||
entity_id: media_player.daniel
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.daniel
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/doorbell.mp3
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: doorbell.mp3
|
||||
thumbnail:
|
||||
media_class: music
|
||||
children_media_class:
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://media_source
|
||||
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
@@ -96,7 +136,7 @@
|
||||
media_content_id: media-source://tts/google_translate?message=der+er+nogen+der+ringer+p%C3%A5%0A
|
||||
media_content_type: provider
|
||||
metadata:
|
||||
title: 'der er nogen der ringer på
|
||||
title: 'der er nogen der ringer på bagdøren
|
||||
|
||||
'
|
||||
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
|
||||
@@ -113,12 +153,12 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "SSS" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på bagdøren - triple-press
|
||||
message: Det ringer på bagdøren (2) - triple-press
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
data:
|
||||
message: Det ringer på bagdøren - triple-press
|
||||
message: Det ringer på bagdøren (2) - triple-press
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
@@ -182,7 +222,7 @@
|
||||
media_content_id: media-source://tts/google_translate?message=der+er+nogen+der+ringer+p%C3%A5%0A
|
||||
media_content_type: provider
|
||||
metadata:
|
||||
title: 'der er nogen der ringer på
|
||||
title: 'der er nogen der ringer på bagdøren
|
||||
|
||||
'
|
||||
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
|
||||
@@ -199,12 +239,12 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "L" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på bagdøren - long-press
|
||||
message: Det ringer på bagdøren (2) - long-press
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
data:
|
||||
message: Det ringer på bagdøren - long-press
|
||||
message: Det ringer på bagdøren (2) - long-press
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "S" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på fordøren
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
@@ -45,10 +45,10 @@
|
||||
target:
|
||||
entity_id: media_player.lille_badevaerelse
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/doorbell-shortened-100308.mp3
|
||||
media_content_id: media-source://media_source/local/Halloween-doorbell.mp3
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: doorbell-shortened-100308.mp3
|
||||
title: Halloween-doorbell.mp3
|
||||
thumbnail:
|
||||
media_class: music
|
||||
children_media_class:
|
||||
@@ -131,7 +131,7 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "SS" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på fordøren - doublepress
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
@@ -217,7 +217,7 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "SSS" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på fordøren - triple-press
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
@@ -303,7 +303,7 @@
|
||||
- condition: template
|
||||
value_template: '{{ trigger.payload_json.event == "L" }}'
|
||||
sequence:
|
||||
- service: notify.mobile_app_clausiphone
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: Det ringer på fordøren - long-press
|
||||
- service: notify.mobile_app_annes_iphone_14_pro
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
- alias: Garageport Anne åben reminder
|
||||
id: garageport_anne_reminder
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: cover.anne
|
||||
to: "open"
|
||||
|
||||
- platform: time
|
||||
at: "21:00:00"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: cover.anne
|
||||
state: "open"
|
||||
|
||||
action:
|
||||
- delay: "00:05:00"
|
||||
|
||||
- repeat:
|
||||
while:
|
||||
- condition: state
|
||||
entity_id: cover.anne
|
||||
state: "open"
|
||||
|
||||
sequence:
|
||||
|
||||
- service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
title: "Garageport"
|
||||
message: "Garageporten er åben. Skal garageporten lukkes?"
|
||||
data:
|
||||
tag: garage_anne_open
|
||||
persistent: true
|
||||
actions:
|
||||
- action: CLOSE_GARAGE_ANNE
|
||||
title: "Ja"
|
||||
- action: IGNORE_GARAGE_ANNE
|
||||
title: "Nej"
|
||||
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: CLOSE_GARAGE_ANNE
|
||||
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: IGNORE_GARAGE_ANNE
|
||||
|
||||
- platform: state
|
||||
entity_id: cover.anne
|
||||
to: "closed"
|
||||
|
||||
timeout: "00:30:00"
|
||||
|
||||
- choose:
|
||||
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger.event.data.action == 'CLOSE_GARAGE_ANNE' }}"
|
||||
sequence:
|
||||
- service: cover.close_cover
|
||||
target:
|
||||
entity_id: cover.anne
|
||||
- stop: "Garage lukket via notifikation"
|
||||
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger.event.data.action == 'IGNORE_GARAGE_ANNE' }}"
|
||||
sequence:
|
||||
- stop: "Bruger valgte Nej"
|
||||
|
||||
- delay: "00:30:00"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: time
|
||||
after: '04:50:00'
|
||||
after: '05:50:00'
|
||||
before: '10:00:00'
|
||||
- condition: state
|
||||
entity_id: input_boolean.first_run
|
||||
@@ -67,6 +67,7 @@
|
||||
# event: sunrise
|
||||
condition:
|
||||
- condition: time
|
||||
after: '08:30:00'
|
||||
before: '12:00:00'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- alias: 'Julelys tænd morgen'
|
||||
trigger:
|
||||
platform: time
|
||||
at: "06:00:00"
|
||||
at: "06:30:00"
|
||||
condition:
|
||||
- condition: state # from sunset until sunrise
|
||||
entity_id: sun.sun
|
||||
@@ -30,7 +30,7 @@
|
||||
event: sunset
|
||||
condition:
|
||||
- condition: time
|
||||
before: '22:00:00'
|
||||
before: '21:30:00'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data:
|
||||
@@ -39,7 +39,7 @@
|
||||
- alias: 'Julelys sluk aften'
|
||||
trigger:
|
||||
platform: time
|
||||
at: "21:00:00"
|
||||
at: "22:00:00"
|
||||
action:
|
||||
- service: light.turn_off
|
||||
data:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
to: 'home'
|
||||
|
||||
action:
|
||||
service: notify.mobile_app_clausiphone
|
||||
service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: 'Mor kommer hjem'
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
to: 'home'
|
||||
|
||||
action:
|
||||
service: notify.mobile_app_clausiphone
|
||||
service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: 'Daniel kommer hjem'
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
to: 'home'
|
||||
|
||||
action:
|
||||
service: notify.mobile_app_clausiphone
|
||||
service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: 'Andreas kommer hjem'
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
to: 'Skole'
|
||||
|
||||
action:
|
||||
service: notify.mobile_app_clausiphone
|
||||
service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: 'Andreas ankommer til skole'
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
from: 'Skole'
|
||||
|
||||
action:
|
||||
service: notify.mobile_app_clausiphone
|
||||
service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: 'Andreas tager fra skole'
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.daniels_iphone_7_3
|
||||
to: 'Skole'
|
||||
to: 'Østre Alle'
|
||||
|
||||
action:
|
||||
service: notify.mobile_app_annes_iphone_14_pro
|
||||
@@ -107,10 +107,10 @@
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.daniels_iphone_7_3
|
||||
to: 'Skole'
|
||||
to: 'Østre Alle'
|
||||
|
||||
action:
|
||||
service: notify.mobile_app_clausiphone
|
||||
service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: 'Daniel ankommer til skole'
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
from: 'Skole'
|
||||
|
||||
action:
|
||||
service: notify.mobile_app_clausiphone
|
||||
service: notify.mobile_app_clausiphone15
|
||||
data:
|
||||
message: 'Daniel tager fra skole'
|
||||
|
||||
|
||||
@@ -1,94 +1,67 @@
|
||||
# - alias: 'Lys Andreas dag - arbejdsdag - sunrise'
|
||||
# trigger:
|
||||
# platform: time
|
||||
# at: '06:00:00'
|
||||
# condition:
|
||||
# - condition: state
|
||||
# entity_id: binary_sensor.arbejdsdag
|
||||
# state: 'on'
|
||||
# action:
|
||||
# - service: script.sunrise
|
||||
- alias: Andreas lys motion
|
||||
mode: restart
|
||||
|
||||
|
||||
- alias: 'Lys Andreas dag - arbejdsdag'
|
||||
trigger:
|
||||
platform: state
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hue_motion_sensor_2_motion_2
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.hue_motion_sensor_2_illuminance_2
|
||||
below: 90
|
||||
- condition: state
|
||||
entity_id: binary_sensor.arbejdsdag
|
||||
state: 'on'
|
||||
- condition: time
|
||||
after: '06:30:00'
|
||||
before: '19:45:00'
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: light.andreas_vaerelse
|
||||
data:
|
||||
brightness_pct: 100
|
||||
to: "on"
|
||||
id: motion_on
|
||||
|
||||
- alias: 'Lys Andreas dag - ikke arbejdsdag'
|
||||
trigger:
|
||||
platform: state
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hue_motion_sensor_2_motion_2
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.hue_motion_sensor_2_illuminance_2
|
||||
below: 90
|
||||
- condition: state
|
||||
entity_id: binary_sensor.arbejdsdag
|
||||
state: 'off'
|
||||
- condition: time
|
||||
after: '10:00:00'
|
||||
before: '20:30:00'
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: light.andreas_vaerelse
|
||||
data:
|
||||
brightness_pct: 100
|
||||
to: "off"
|
||||
id: motion_off
|
||||
|
||||
# - alias: 'Lys Andreas aften'
|
||||
# trigger:
|
||||
# platform: state
|
||||
# entity_id: binary_sensor.hue_motion_sensor_2_motion_2
|
||||
# to: 'on'
|
||||
# condition:
|
||||
# - condition: numeric_state
|
||||
# entity_id: sensor.hue_motion_sensor_2_illuminance_2
|
||||
# below: 90
|
||||
# - condition: time
|
||||
# after: '20:00:01'
|
||||
# before: '21:00:00'
|
||||
# action:
|
||||
# - service: homeassistant.turn_on
|
||||
# target:
|
||||
# entity_id: light.andreas_vaerelse
|
||||
# data:
|
||||
# brightness_pct: 50
|
||||
variables:
|
||||
lux_limit: "{{ states('input_number.andreas_lux_threshold') | int }}"
|
||||
brightness: "{{ states('input_number.andreas_brightness') | int }}"
|
||||
timeout: "{{ states('input_number.andreas_timeout') | int }}"
|
||||
|
||||
action:
|
||||
|
||||
- choose:
|
||||
|
||||
- alias: 'Sluk lys i Andreas'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.hue_motion_sensor_2_motion_2
|
||||
to: 'off'
|
||||
for:
|
||||
minutes: 10
|
||||
condition:
|
||||
- condition: time
|
||||
after: '05:00:00'
|
||||
before: '20:00:00'
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
data:
|
||||
entity_id:
|
||||
- light.andreas_vaerelse
|
||||
# Motion detected
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: motion_on
|
||||
|
||||
# ⚠️ Skift numeric_state til template condition
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ states('sensor.hue_motion_sensor_2_illuminance_2') | int < lux_limit }}
|
||||
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% set t = now().strftime('%H%M') | int %}
|
||||
{% if is_state('binary_sensor.arbejdsdag','on') %}
|
||||
{{ 630 <= t <= 1945 }}
|
||||
{% else %}
|
||||
{{ 1000 <= t <= 2030 }}
|
||||
{% endif %}
|
||||
|
||||
sequence:
|
||||
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.andreas_vaerelse
|
||||
data:
|
||||
brightness_pct: "{{ brightness }}"
|
||||
|
||||
# Motion stopped
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: motion_off
|
||||
|
||||
sequence:
|
||||
|
||||
- delay:
|
||||
minutes: "{{ timeout }}"
|
||||
|
||||
- condition: state
|
||||
entity_id: binary_sensor.hue_motion_sensor_2_motion_2
|
||||
state: "off"
|
||||
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.andreas_vaerelse
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
- id: badevaerelse_motion_lys
|
||||
alias: Badeværelse lys via bevægelse
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.badevaerelse_bevaegelse
|
||||
to: "on"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
# Arbejdsdag dagtid (06:00–22:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.arbejdsdag
|
||||
state: "on"
|
||||
- condition: time
|
||||
after: "06:00:00"
|
||||
before: "22:00:00"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.badevaerelse_klar
|
||||
|
||||
# Ikke arbejdsdag dagtid (08:00–22:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.arbejdsdag
|
||||
state: "off"
|
||||
- condition: time
|
||||
after: "08:00:00"
|
||||
before: "22:00:00"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.badevaerelse_klar
|
||||
|
||||
# Nat (alle andre tidspunkter)
|
||||
default:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.badevaerelse_nat_2_lys
|
||||
|
||||
- id: badevaerelse_motion_sluk
|
||||
alias: Sluk lys på badeværelse efter bevægelse
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.badevaerelse_bevaegelse
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 3 # Standard nat-timeout, kan ændres til 10 for dag, osv.
|
||||
|
||||
action:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
area_id: badevaerelse
|
||||
@@ -85,7 +85,7 @@
|
||||
condition:
|
||||
- condition: time
|
||||
after: '05:00:00'
|
||||
before: '17:00:00'
|
||||
before: '22:00:00'
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
data:
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
- alias: Kontor lys motion
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.kontor_motion_bevaegelse
|
||||
to: "on"
|
||||
|
||||
variables:
|
||||
timeout: >
|
||||
{% if now().hour >= 6 and now().hour < 22 %}
|
||||
{{ states('input_number.kontor_timeout_day') | int }}
|
||||
{% else %}
|
||||
{{ states('input_number.kontor_timeout_night') | int }}
|
||||
{% endif %}
|
||||
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.kontor_klar
|
||||
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.kontor_motion_bevaegelse
|
||||
to: "off"
|
||||
|
||||
- delay:
|
||||
minutes: "{{ timeout }}"
|
||||
|
||||
- condition: state
|
||||
entity_id: binary_sensor.kontor_motion_bevaegelse
|
||||
state: "off"
|
||||
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.strip
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
- id: garage_auto_claus_distance
|
||||
alias: Garage auto Claus
|
||||
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.claus_distance_home
|
||||
below: 40
|
||||
id: arriving
|
||||
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.claus_distance_home
|
||||
above: 60
|
||||
id: leaving
|
||||
|
||||
condition:
|
||||
- condition: time
|
||||
after: "05:30:00"
|
||||
before: "22:30:00"
|
||||
- condition: state
|
||||
entity_id: device_tracker.snowywhite_location_tracker
|
||||
state: "home"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
|
||||
# ÅBN
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: arriving
|
||||
- condition: state
|
||||
entity_id: cover.anne
|
||||
state: "closed"
|
||||
sequence:
|
||||
- service: cover.open_cover
|
||||
target:
|
||||
entity_id: cover.anne
|
||||
|
||||
# LUK
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: leaving
|
||||
- condition: state
|
||||
entity_id: cover.anne
|
||||
state: "open"
|
||||
sequence:
|
||||
- service: cover.close_cover
|
||||
target:
|
||||
entity_id: cover.anne
|
||||
|
||||
mode: single
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Når apple tv skifter til source DRTV eller TV 2 PLAY, så skift audiomode til MCH STEREO på Denon reciever.
|
||||
# Ellers sæt audiomode til DOLBY DIGITAL
|
||||
|
||||
- alias: "ATV playing DRTV, change sound to MCH STEREO"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.living_room_tv_source
|
||||
to: 'DRTV'
|
||||
action:
|
||||
service: media_player.select_sound_mode
|
||||
data:
|
||||
sound_mode: MCH STEREO
|
||||
entity_id: media_player.denon_avr_x2300w
|
||||
|
||||
- alias: "ATV playing TV2PLAY, change sound to MCH STEREO"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.living_room_tv_source
|
||||
to: 'TV 2 PLAY'
|
||||
action:
|
||||
service: media_player.select_sound_mode
|
||||
data:
|
||||
sound_mode: MCH STEREO
|
||||
entity_id: media_player.denon_avr_x2300w
|
||||
|
||||
- alias: "ATV playing Netflix, change sound to DOLBY DIGITAL"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.living_room_tv_source
|
||||
to: 'Netflix'
|
||||
action:
|
||||
service: media_player.select_sound_mode
|
||||
data:
|
||||
sound_mode: DOLBY DIGITAL
|
||||
entity_id: media_player.denon_avr_x2300w
|
||||
@@ -0,0 +1,74 @@
|
||||
- id: roborock_smart_cleaning
|
||||
alias: Roborock Smart Cleaning
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- id: house_empty
|
||||
platform: state
|
||||
entity_id: binary_sensor.family_presence
|
||||
to: "off"
|
||||
for: "00:30:00"
|
||||
|
||||
- id: someone_home
|
||||
platform: state
|
||||
entity_id: binary_sensor.family_presence
|
||||
to: "on"
|
||||
|
||||
- id: midnight
|
||||
platform: time
|
||||
at: "00:00:00"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
|
||||
# 🔹 Reset daglig tæller ved midnat
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: midnight
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.roborock_auto_runs_today
|
||||
data:
|
||||
value: 0
|
||||
|
||||
# 🔹 Start rengøring hvis huset har været tomt i 30 min
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: house_empty
|
||||
|
||||
- condition: numeric_state
|
||||
entity_id: input_number.roborock_auto_runs_today
|
||||
below: 2
|
||||
|
||||
- condition: state
|
||||
entity_id: vacuum.roborock_s8_pro_ultra
|
||||
state: docked
|
||||
|
||||
- condition: numeric_state
|
||||
entity_id: vacuum.roborock_s8_pro_ultra
|
||||
attribute: battery_level
|
||||
above: 20
|
||||
|
||||
sequence:
|
||||
- service: button.press
|
||||
target:
|
||||
entity_id: button.roborock_s8_pro_ultra_kokken_bryggers
|
||||
|
||||
- service: input_number.increment
|
||||
target:
|
||||
entity_id: input_number.roborock_auto_runs_today
|
||||
|
||||
# 🔹 Stop robotten hvis nogen kommer hjem
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: someone_home
|
||||
|
||||
- condition: state
|
||||
entity_id: vacuum.roborock_s8_pro_ultra
|
||||
state: cleaning
|
||||
|
||||
sequence:
|
||||
- service: vacuum.return_to_base
|
||||
target:
|
||||
entity_id: vacuum.roborock_s8_pro_ultra
|
||||
Reference in New Issue
Block a user