8876 lines
252 KiB
YAML
8876 lines
252 KiB
YAML
- alias: Achterdeur sluiten warm buiten
|
|
id: 2df820fc-5f67-4ed6-a150-be60e6c4b9fa
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_achterdeur
|
|
to: 'on'
|
|
for:
|
|
seconds: 90
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.gemiddelde_temp_binnen'') | float(default=0)
|
|
< states(''sensor.buiten_temperatuur'') | float(default=0) }}
|
|
|
|
'
|
|
- condition: numeric_state
|
|
entity_id: sensor.gemiddelde_temp_beneden
|
|
above: 22
|
|
actions:
|
|
- action: homeassistant.update_entity
|
|
target:
|
|
entity_id: sensor.achterdeur
|
|
- action: media_player.play_media
|
|
continue_on_error: true
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
data:
|
|
announce: true
|
|
media_content_type: music
|
|
extra:
|
|
volume: 65
|
|
media_content_id: "{% set message = states('sensor.achterdeur') %}\n media-source://tts/tts.home_assistant_cloud?message=\"\
|
|
{{message}}\"\n"
|
|
- delay:
|
|
seconds: 60
|
|
- action: homeassistant.update_entity
|
|
target:
|
|
entity_id: sensor.achterdeur
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_achterdeur
|
|
state: 'on'
|
|
- action: script.notify_everyone_at_home
|
|
data:
|
|
title: Achterdeur - 2de waarschuwing!
|
|
message: Er heeft weer iemand de achterdeur laten openstaan!!
|
|
data:
|
|
attachment:
|
|
content-type: jpeg
|
|
url: https://i.pinimg.com/564x/15/05/b6/1505b62ff8865779be85192fed6027e1.jpg
|
|
push:
|
|
sound: door_creak_closing.wav
|
|
- action: media_player.play_media
|
|
continue_on_error: true
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
data:
|
|
announce: true
|
|
media_content_type: music
|
|
extra:
|
|
volume: 65
|
|
media_content_id: "{% set message = states('sensor.achterdeur') %}\n media-source://tts/tts.home_assistant_cloud?message=\"\
|
|
{{message}}\"\n"
|
|
- alias: Light inkom achterdeur open
|
|
id: 5d7a7e2a-ceeb-4b06-b900-ead7be000f41
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_achterdeur
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.keuken_luster
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: light.keuken_inkom
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: light.keuken_spots
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'true'
|
|
actions:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.keuken_inkom
|
|
- alias: Achtergevel openen
|
|
id: 295ff81a-e388-498f-8c2c-077f9734d06c
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.sun_azimut
|
|
above: 230
|
|
- platform: state
|
|
entity_id: sensor.dark_outside
|
|
to: 'true'
|
|
for:
|
|
minutes: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.zonne_energie_gefilterd_lowpass
|
|
below: 400
|
|
for:
|
|
minutes: 5
|
|
- platform: template
|
|
value_template: '{{ states("sensor.windsnelheid") | int(0) > 40 }}
|
|
|
|
'
|
|
- platform: template
|
|
value_template: '{{ states("sensor.windvlaag") | int(0) > 60 }}
|
|
|
|
'
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
below: 10000
|
|
for:
|
|
minutes: 5
|
|
- platform: template
|
|
value_template: ''
|
|
- platform: template
|
|
value_template: "{% if states(\"sensor.regen_komende_10_minuten\") != \"unknown\"\
|
|
\ and states(\"sensor.regen_komende_10_minuten\") != \"unavailable\" %}\n {{\
|
|
\ states(\"sensor.regen_komende_10_minuten\") | float > 0.80 }}\n{% else %}\n\
|
|
\ {{ states(\"sensor.neerslagverwachting_gemiddeld\") | float > 0.80 }}\n\
|
|
{% endif %}\n"
|
|
- platform: template
|
|
value_template: "{% if states(\"sensor.neerslag_zandhoven\") != \"unknown\" and\
|
|
\ states(\"sensor.neerslag_zandhoven\") != \"unavailable\" %}\n {{ states(\"\
|
|
sensor.neerslag_zandhoven\") | float > 0.40 }}\n{% else %}\n {{ states(\"sensor.neerslagintensiteit\"\
|
|
) | float > 0.40 }}\n{% endif %}\n"
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.achtergevel_closed
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.keuken_1", "current_position") < 50 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.keuken_2", "current_position") < 50 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.slaapkamer", "current_position") < 50
|
|
}}
|
|
|
|
'
|
|
- condition: state
|
|
entity_id: input_boolean.nacht_closed
|
|
state: 'off'
|
|
actions:
|
|
- action: script.achtergevel_openen
|
|
- delay:
|
|
minutes: 5
|
|
- action: script.achtergevel_openen
|
|
- alias: Achtergevel sluiten
|
|
id: 9d85fbd0-a081-4afa-8c56-d9216ea52a37
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
for:
|
|
minutes: 5
|
|
above: 15000
|
|
- platform: time_pattern
|
|
minutes: /10
|
|
seconds: 0
|
|
- platform: template
|
|
value_template: "{{ states(\"sensor.buiten_lichtsterkte\") | int(0) > 5000 and\n\
|
|
\ now().hour < 9 }}\n"
|
|
id: ochtend
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.sun_azimut
|
|
above: 70
|
|
below: 200
|
|
- condition: numeric_state
|
|
entity_id: sun.sun
|
|
value_template: '{{ state.attributes.elevation }}'
|
|
above: 10
|
|
- condition: numeric_state
|
|
entity_id: sensor.zonne_energie_gefilterd_lowpass
|
|
above: 580
|
|
- condition: or
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
above: 15000
|
|
- condition: trigger
|
|
id: ochtend
|
|
- condition: template
|
|
value_template: '{{ states("sensor.windsnelheid") | int(0) < 40 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.windvlaag") | int(0) < 60 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: "{% if states(\"sensor.regen_komende_10_minuten\") != \"unknown\"\
|
|
\ and states(\"sensor.regen_komende_10_minuten\") != \"unavailable\" %}\n\
|
|
\ {{ states(\"sensor.regen_komende_10_minuten\") | float < 0.15 }}\n{% else\
|
|
\ %}\n {{ states(\"sensor.neerslagverwachting_gemiddeld\") | float < 0.15\
|
|
\ }}\n{% endif %}\n"
|
|
- condition: template
|
|
value_template: "{% if states(\"sensor.neerslag_zandhoven\") != \"unknown\"\
|
|
\ and states(\"sensor.neerslag_zandhoven\") != \"unavailable\" %}\n {{ states(\"\
|
|
sensor.neerslag_zandhoven\") | float < 0.15 }}\n{% else %}\n {{ states(\"\
|
|
sensor.neerslagintensiteit\") | float < 0.15 }}\n{% endif %}\n"
|
|
- condition: numeric_state
|
|
entity_id: sensor.max_uv_index
|
|
above: 3
|
|
- condition: numeric_state
|
|
entity_id: sensor.buitentemperatuur_gefilterd
|
|
above: 15
|
|
- condition: numeric_state
|
|
entity_id: sensor.gemiddelde_temp_beneden
|
|
above: 22
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_temperatuur_buiten_voorspelling_12u")
|
|
| float(0) > (states("sensor.gemiddelde_temp_beneden") | float(0) - 2) }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ now().month > 3 }}'
|
|
- condition: template
|
|
value_template: '{{ now().month < 10 }}'
|
|
- condition: state
|
|
entity_id: script.zijgevel_sluiten
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.achtergevel_closed
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.keuken_1", "current_position") > 50 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.keuken_2", "current_position") > 50 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.slaapkamer", "current_position") > 50
|
|
}}
|
|
|
|
'
|
|
actions:
|
|
- action: script.achtergevel_sluiten
|
|
- alias: Verlichting afdak
|
|
id: 960aa9bb-f469-49fd-8128-4c2e14b84563
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.afdak_deur
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ as_timestamp(now()) - as_timestamp(states("sensor.uptime"))
|
|
> 60 }}
|
|
|
|
'
|
|
- condition: state
|
|
entity_id: sensor.dark_outside
|
|
state: 'true'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.afdak_deur
|
|
state: 'on'
|
|
sequence:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.afdak_verlichting
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=300) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.afdak_verlichting_end_time
|
|
default:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.afdak_verlichting
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.afdak_verlichting_end_time
|
|
- alias: Control excess control afwasmachien
|
|
id: 2e149c66-0924-4c5a-892b-ebd69e44bed1
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- switch.afwasmachien
|
|
to: 'off'
|
|
from: 'on'
|
|
id: switch
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.afwasmachien_staat_op
|
|
to: 'off'
|
|
id: automation
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.afwasmachien
|
|
state: 'off'
|
|
- condition: trigger
|
|
id: switch
|
|
sequence:
|
|
- service: automation.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: automation.afwasmachien_optimizer
|
|
- conditions:
|
|
- condition: trigger
|
|
id: automation
|
|
sequence:
|
|
- service: automation.turn_off
|
|
data:
|
|
stop_actions: false
|
|
target:
|
|
entity_id: automation.afwasmachien_optimizer
|
|
mode: single
|
|
- alias: Alarm aan
|
|
id: 49873b07-7d1b-4fb6-a8cf-fa2f986fded7
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.alarm
|
|
to: 'on'
|
|
actions:
|
|
- action: script.turn_on
|
|
entity_id:
|
|
- script.alarm_lights1
|
|
- script.alarm_sound
|
|
- alias: Alarm arm away
|
|
id: 73eba5ec-f30e-4963-94f8-5c5520ce2ab0
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
to: Juist Weg
|
|
- platform: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
to: Afwezig
|
|
- platform: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
to: Juist Weg
|
|
- platform: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
to: Afwezig
|
|
- platform: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
to: Juist Weg
|
|
- platform: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
to: Afwezig
|
|
- platform: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
to: Juist Weg
|
|
- platform: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
to: Afwezig
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Juist Weg
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Afwezig
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Langdurig Afwezig
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
state: Juist Weg
|
|
- condition: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
state: Afwezig
|
|
- condition: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
state: Langdurig Afwezig
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
state: Juist Weg
|
|
- condition: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
state: Afwezig
|
|
- condition: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
state: Langdurig Afwezig
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Juist Weg
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Afwezig
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Langdurig Afwezig
|
|
actions:
|
|
- action: alarm_control_panel.alarm_arm_away
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
data:
|
|
code: secret alarm_code
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: media_player.mass_keuken
|
|
state: playing
|
|
sequence:
|
|
- action: media_player.media_pause
|
|
entity_id: media_player.mass_keuken
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: media_player.mass_badkamer
|
|
state: playing
|
|
sequence:
|
|
- action: media_player.media_pause
|
|
entity_id: media_player.mass_badkamer
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: media_player.mass_living_2
|
|
state: playing
|
|
sequence:
|
|
- action: media_player.media_pause
|
|
entity_id: media_player.mass_living_2
|
|
- alias: Alarm arm night
|
|
id: 3ab59385-d409-4777-abae-9c461a9fd442
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.philips_tv
|
|
from: 'on'
|
|
to: 'off'
|
|
- platform: state
|
|
entity_id: light.slaapkamer_spot
|
|
to: 'off'
|
|
- platform: state
|
|
entity_id: light.slaapkamer_hoog
|
|
to: 'off'
|
|
- platform: template
|
|
value_template: '{{ states("binary_sensor.gphone_focus") == "on" and states("device_tracker.gphone_bermuda")
|
|
== "home" }}
|
|
|
|
'
|
|
- platform: template
|
|
value_template: '{{ states("binary_sensor.mphone_focus") == "on" and states("device_tracker.mphone_bermuda")
|
|
== "home" }}
|
|
|
|
'
|
|
condition:
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.mass_keuken
|
|
state: playing
|
|
- condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: '20:15:00'
|
|
before: 04:00:00
|
|
- condition: template
|
|
value_template: '{{ states(''alarm_control_panel.ha_alarm'') = ''arming'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''alarm_control_panel.ha_alarm'') = ''armed_night''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''media_player.philips_tv'') = ''on'' }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Juist Aangekomen
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Juist Aangekomen
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
state: Juist Aangekomen
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
state: Juist Aangekomen
|
|
actions:
|
|
- action: light.turn_on
|
|
data:
|
|
brightness: 255
|
|
rgb_color:
|
|
- 255
|
|
- 236
|
|
- 182
|
|
entity_id: light.slaapkamer_spot
|
|
- delay:
|
|
seconds: 5
|
|
- action: alarm_control_panel.alarm_arm_night
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
data:
|
|
code: secret alarm_code
|
|
- delay:
|
|
minutes: 20
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.badkamer_grouped_not_master
|
|
state: 'on'
|
|
sequence:
|
|
- action: media_player.unjoin
|
|
target:
|
|
entity_id: media_player.mass_badkamer
|
|
- alias: Alarm disarm
|
|
id: 94a4b642-8571-4080-8c7d-fed9b86375c1
|
|
trigger:
|
|
- platform: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
to: Juist Aangekomen
|
|
- platform: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
to: Juist Aangekomen
|
|
- platform: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
to: Juist Aangekomen
|
|
- platform: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
to: Juist Aangekomen
|
|
- platform: state
|
|
entity_id: media_player.mass_keuken
|
|
to: playing
|
|
- platform: state
|
|
entity_id: switch.koffiezet
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Juist Aangekomen
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Juist Aangekomen
|
|
- condition: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
state: Juist Aangekomen
|
|
- condition: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
state: Juist Aangekomen
|
|
actions:
|
|
- action: alarm_control_panel.alarm_disarm
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
data:
|
|
code: secret alarm_code
|
|
- alias: Alarm state
|
|
id: 4ced9dd8-0af2-40ff-914a-46016440a5c7
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
from: arming
|
|
to: armed_away
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
to: disarmed
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
from: arming
|
|
to: armed_night
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
to: armed_home
|
|
actions:
|
|
- action: notify.giel_en_martine
|
|
data_template:
|
|
title: Bericht van Home-Assistant.
|
|
message: "{% if is_state(\"alarm_control_panel.ha_alarm\", \"armed_away\") -%}\n\
|
|
\ Niemand thuis, beveiliging ingeschakeld.\n{% elif is_state(\"alarm_control_panel.ha_alarm\"\
|
|
, \"disarmed\") -%}\n Beveiliging uitgeschakeld.\n{% elif as_timestamp(now())\
|
|
\ - as_timestamp(state_attr('automation.alarm_arm_night', 'last_triggered'))\
|
|
\ | float(default=0) < 600 -%}\n Slaapwel, beveiliging ingeschakeld.\n{%\
|
|
\ elif is_state(\"alarm_control_panel.ha_alarm\", \"armed_home\") -%}\n Beveiliging\
|
|
\ ingeschakeld terwijl er iemand thuis is.\n{% endif %}\n"
|
|
- alias: Alarm re-arm night
|
|
id: a689d4e9-11e3-4dd6-ba59-a3c0a525c5f2
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
from: armed_night
|
|
to: disarmed
|
|
condition:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ now().hour is in [22, 23, 0, 1, 2, 3, 4, 5] }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.people_arrive_count") | int(0) > 0 }}
|
|
|
|
'
|
|
actions:
|
|
- wait_template: '{{ states("sensor.people_arrive_count") | int(0) == 0 }}
|
|
|
|
'
|
|
- delay:
|
|
minutes: 10
|
|
- action: alarm_control_panel.alarm_arm_night
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
data:
|
|
code: secret alarm_code
|
|
- alias: Alarm uit
|
|
id: 128652ab-6a7c-44db-9cd4-820f7b0ff909
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.alarm
|
|
to: 'off'
|
|
actions:
|
|
- action: script.turn_off
|
|
entity_id:
|
|
- script.alarm_lights1
|
|
- script.alarm_lights2
|
|
- script.alarm_sound
|
|
- delay: 00:00:09
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.alle_tuinverlichting
|
|
- light.spots_tv
|
|
- alias: Alles uit licht buiten
|
|
id: 7b1a746e-2004-45b4-8d6f-2a20e3a4e2a8
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.dark_outside
|
|
to: 'false'
|
|
id: buiten
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
to: 'false'
|
|
for:
|
|
seconds: 2
|
|
id: binnen
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: buiten
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id: light.alle_tuinverlichting
|
|
- delay:
|
|
seconds: 2
|
|
- action: light.turn_off
|
|
entity_id: light.afdak_verlichting
|
|
- conditions:
|
|
- condition: trigger
|
|
id: binnen
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.noor
|
|
- light.fien
|
|
- light.slaapkamer_spot
|
|
- light.slaapkamer_hoog
|
|
- light.danszaal_luster
|
|
- light.danszaal_spots
|
|
- light.keuken_inkom
|
|
- light.keuken_luster
|
|
- light.keuken_spots
|
|
- light.trap
|
|
- light.vogelpik
|
|
- light.garage_sfeerverlichting
|
|
- light.garage_sjotterbak
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.spots_tv
|
|
- delay:
|
|
seconds: 5
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.spots_tv
|
|
- id: '1603382266087'
|
|
alias: profiler
|
|
description: profiler
|
|
trigger:
|
|
- platform: time
|
|
at: '17:59'
|
|
condition: []
|
|
actions:
|
|
- action: profiler.start
|
|
data: {}
|
|
mode: single
|
|
- id: '1617444794333'
|
|
alias: Shelly herstarten
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: 'switch.shelly_badkamer_verluchting_herstarten '
|
|
to: 'off'
|
|
from: unavailable
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.shelly_badkamer_verluchting_status
|
|
state: 'off'
|
|
for: 00:05:00
|
|
actions:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.shelly_badkamer_verluchting_herstarten
|
|
mode: parallel
|
|
max: 10
|
|
- id: '1650959980916'
|
|
alias: Unifi unavailable
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- device_tracker.droommachien
|
|
from: home
|
|
for:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
condition: []
|
|
actions:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: Unifi nazien!!!
|
|
mode: single
|
|
- id: '1675907714800'
|
|
alias: Max piek notificatie 3
|
|
description: ''
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: '15'
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ as_timestamp(now()) - as_timestamp(states.input_number.max_peak_2.last_changed.timestamp()
|
|
| timestamp_local()) < 900 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ as_timestamp(now()) - as_timestamp(states("sensor.uptime"))
|
|
> 900 }}
|
|
|
|
'
|
|
actions:
|
|
- action: persistent_notification.create
|
|
data:
|
|
message: "Op kwartierbasis:\n{% for state in states.sensor -%} {% if \"quarter\"\
|
|
\ in state.entity_id -%} {% if state.attributes.last_period | float(0) > 0\
|
|
\ -%}\n {{ state.attributes.friendly_name }} = {{ state.attributes.last_period\
|
|
\ }} kWh\n{% endif -%} {% endif -%} {% endfor %}\nOp uurbasis:\n{% for state\
|
|
\ in states.sensor -%} {% if \"quarter\" in state.entity_id -%} {% if state.attributes.last_period\
|
|
\ | float(0) > 0 -%}\n {{ state.attributes.friendly_name | replace(\"kwartierverbruik\"\
|
|
, \"uurverbruik\") }} = {{ state.attributes.last_period | float * 4}} kWh\n\
|
|
{% endif -%} {% endif -%} {% endfor -%}"
|
|
mode: single
|
|
- id: '1685887833753'
|
|
alias: Beweging poort
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.poort
|
|
to: 'on'
|
|
condition: []
|
|
actions:
|
|
- action: notify.giel_en_martine
|
|
data:
|
|
message: Beweging poort
|
|
mode: single
|
|
- id: '1699040529160'
|
|
alias: poort gphone
|
|
description: ''
|
|
triggers:
|
|
- entity_id:
|
|
- binary_sensor.poort
|
|
to: 'on'
|
|
trigger: state
|
|
conditions: []
|
|
actions:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: Poort
|
|
data:
|
|
actions:
|
|
- action: POORT
|
|
title: Afzetten?
|
|
mode: single
|
|
- id: '1741689014825'
|
|
alias: Gang verklikker
|
|
description: ''
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- binary_sensor.gang_boven_pir
|
|
to: 'on'
|
|
id: gang
|
|
- trigger: state
|
|
entity_id:
|
|
- binary_sensor.trap_aqara_pir
|
|
to: 'on'
|
|
id: trap
|
|
conditions: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id:
|
|
- gang
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: Gang boven!
|
|
data:
|
|
actions:
|
|
- action: GANG
|
|
title: Afzetten?
|
|
uri: /lovelace/boven
|
|
- conditions:
|
|
- condition: trigger
|
|
id:
|
|
- trap
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: Trap!!!
|
|
data: {}
|
|
- action: automation.turn_off
|
|
metadata: {}
|
|
data:
|
|
stop_actions: true
|
|
target:
|
|
entity_id: automation.gang_verklikker
|
|
mode: parallel
|
|
max: 10
|
|
- alias: ''
|
|
initial_state: 'on'
|
|
trigger:
|
|
- platform: state
|
|
entity_id: null
|
|
from: 'on'
|
|
to: 'off'
|
|
- platform: state
|
|
entity_id: null
|
|
from: 'on'
|
|
to: 'off'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: ''
|
|
before: ''
|
|
- condition: template
|
|
value_template: ''
|
|
- condition: template
|
|
value_template: ''
|
|
- condition: template
|
|
value_template: ''
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: null
|
|
state: ''
|
|
- condition: state
|
|
entity_id: null
|
|
state: ''
|
|
actions:
|
|
- action: null
|
|
entity_id: null
|
|
- action: null
|
|
entity_id: null
|
|
data:
|
|
code: null
|
|
- action: null
|
|
entity_id: null
|
|
- action: null
|
|
data_template:
|
|
identity: ''
|
|
- alias: beveiliging verwarming badkamer
|
|
id: 83eacc0d-19be-46cc-9bdf-78dd96de73e9
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /5
|
|
seconds: 0
|
|
condition:
|
|
condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.badkamer
|
|
state: 'on'
|
|
action:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: verwarmingPi/output/badkamer/set
|
|
retain: true
|
|
payload: 'OFF'
|
|
- alias: Badkamer join
|
|
id: 1154da8f-d6ff-4ad8-9cc3-ebe8501fcee7
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.badkamer_bezetting
|
|
to: 'on'
|
|
condition:
|
|
- condition: and
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.people_home
|
|
below: 2
|
|
above: 0
|
|
- condition: state
|
|
entity_id: binary_sensor.giel_bayesian
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: media_player.mass_keuken
|
|
state: playing
|
|
actions:
|
|
sequence:
|
|
- action: media_player.join
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
data:
|
|
group_members:
|
|
- media_player.mass_badkamer
|
|
- alias: Badkamer unjoin
|
|
id: 5d92af17-35b7-4191-b015-99d5644a0b39
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.badkamer_bezetting
|
|
to: 'off'
|
|
for:
|
|
minutes: 10
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.badkamer_grouped_not_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: media_player.mass_badkamer
|
|
state: playing
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.badkamer_grouped_not_master
|
|
state: 'on'
|
|
sequence:
|
|
- action: media_player.unjoin
|
|
target:
|
|
entity_id: media_player.mass_badkamer
|
|
- delay:
|
|
seconds: 5
|
|
- action: media_player.volume_set
|
|
data:
|
|
volume_level: 0.14
|
|
target:
|
|
entity_id:
|
|
- media_player.mass_badkamer
|
|
default:
|
|
- action: media_player.media_pause
|
|
entity_id: media_player.mass_badkamer
|
|
- delay:
|
|
seconds: 5
|
|
- action: media_player.volume_set
|
|
data:
|
|
volume_level: 0.14
|
|
target:
|
|
entity_id:
|
|
- media_player.mass_badkamer
|
|
- id: '1594823233838'
|
|
alias: Zigbee sensors batterijen
|
|
description: ''
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.schakelaar_slaapkamer_noor_power
|
|
below: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.schakelaar_slaapkamer_fien_power
|
|
below: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.gang_rookmelder_battery
|
|
below: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.living_rookmelder_battery
|
|
below: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.waskot_rookmelder_battery
|
|
below: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.kelder_rookmelder_batterij
|
|
below: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.garage_deur_battery
|
|
below: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.keuken_achterdeur_battery
|
|
below: 5
|
|
condition: []
|
|
actions:
|
|
- action: notify.giel_en_martine
|
|
data_template:
|
|
message: Batterijen van zigbee sensor {{ trigger.entity_id }} nakijken
|
|
- alias: Bitch naar dock
|
|
id: eb295709-5c0f-4697-9aa2-76098ebb340f
|
|
initial_state: 'on'
|
|
trigger:
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: RETURN
|
|
actions:
|
|
- action: vacuum.return_to_base
|
|
entity_id: vacuum.claptrap
|
|
- alias: Wijziging setpunt tijdens verwarmen
|
|
id: ff824a13-ba8c-483b-ae54-9fe625410d90
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.setpunt_badkamer
|
|
- platform: state
|
|
entity_id: input_select.setpunt_fien
|
|
- platform: state
|
|
entity_id: input_select.setpunt_noor
|
|
- platform: state
|
|
entity_id: input_select.setpunt_slaapkamer
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: "{% if trigger.entity_id == 'input_select.setpunt_badkamer'\
|
|
\ %}\n {{ is_state(\"climate.badkamer\", \"heat\") }}\n{% elif trigger.entity_id\
|
|
\ == 'input_select.setpunt_fien' %}\n {{ is_state(\"climate.fien\", \"heat\"\
|
|
) }}\n{% elif trigger.entity_id == 'input_select.setpunt_noor' %}\n {{ is_state(\"\
|
|
climate.noor\", \"heat\") }}\n{% else %}\n {{ is_state(\"climate.slaapkamer\"\
|
|
, \"heat\") }}\n{% endif %}\n"
|
|
actions:
|
|
- action: climate.set_temperature
|
|
data_template:
|
|
entity_id: "{% if trigger.entity_id == 'input_select.setpunt_badkamer' %}\n\
|
|
\ climate.badkamer\n{% elif trigger.entity_id == 'input_select.setpunt_fien'\
|
|
\ %}\n climate.fien\n{% elif trigger.entity_id == 'input_select.setpunt_noor'\
|
|
\ %}\n climate.noor\n{% else %}\n climate.slaapkamer\n{% endif %}\n"
|
|
temperature: "{% if trigger.entity_id == 'input_select.setpunt_badkamer' %}\n\
|
|
\ {{ states('input_select.setpunt_badkamer') }}\n{% elif trigger.entity_id\
|
|
\ == 'input_select.setpunt_fien' %}\n {{ states('input_select.setpunt_fien')\
|
|
\ }}\n{% elif trigger.entity_id == 'input_select.setpunt_noor' %}\n {{ states('input_select.setpunt_noor')\
|
|
\ }}\n{% else %}\n {{ states('input_select.setpunt_slaapkamer') }}\n{% endif\
|
|
\ %}"
|
|
- alias: Knop Giel 2 klik
|
|
id: 3a44ad3f-7801-46c4-81f5-07b88ebed867
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_giel_2_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: script.vertraagd_uit
|
|
- alias: Knop Giel 3 klik
|
|
id: e045e4fa-7a6b-4180-86ce-5da8f74a9cbb
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_giel_3_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: switch.turn_on
|
|
entity_id: switch.koffiezet
|
|
- alias: Knop Giel 4 klik
|
|
id: 174aa54a-b41e-40a6-8080-5bf219235aa6
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_giel_4_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
data:
|
|
brightness: 255
|
|
entity_id:
|
|
- light.noor
|
|
- light.fien
|
|
- alias: Knop Giel klik
|
|
id: 2467cbf3-8621-4925-b41d-3f64cb5f81e7
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_giel_klik
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.slaapkamer_spot") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.slaapkamer_spot
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.slaapkamer_spot
|
|
brightness: 255
|
|
- alias: Knop Martine 2 klik
|
|
id: 597dd2e9-27bd-4aa5-8cad-a86891144375
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_martine_2_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: script.vertraagd_uit_martine
|
|
- alias: Knop Martine 3 klik
|
|
id: da9df8c8-6328-45af-a00a-e03394b9d30c
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_martine_3_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: switch.turn_on
|
|
entity_id: switch.koffiezet
|
|
- alias: Knop Martine 4 klik
|
|
id: e20e0b48-2f7e-4331-ad06-efa5f6589f7a
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_martine_4_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
data:
|
|
brightness: 255
|
|
entity_id:
|
|
- light.noor
|
|
- light.fien
|
|
- alias: Knop Martine klik
|
|
id: 15355d61-2623-4100-a202-d2790ef8db66
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_martine_klik
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.slaapkamer_spot") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.slaapkamer_spot
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.slaapkamer_spot
|
|
brightness: 255
|
|
- alias: Knop Noor 2 klik
|
|
id: 6574f893-40a2-4393-83f7-d19801558678
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_noor_2_klik
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.wled_noor") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.wled_noor
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.wled_noor
|
|
effect: Solid
|
|
brightness: 9
|
|
rgb_color:
|
|
- 4
|
|
- 0
|
|
- 255
|
|
- alias: Knop Noor 3 klik
|
|
id: 816248a1-aaeb-4dcc-bdbf-35d6df291954
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_noor_3_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: switch.turn_on
|
|
entity_id: switch.wled_noor_nightlight
|
|
- alias: Knop Noor 4 klik
|
|
initial_state: 'on'
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_noor_4_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.noor
|
|
data:
|
|
brightness: 70
|
|
- alias: Knop Noor 5 klik
|
|
id: 40a60f6c-c147-4b72-b7c0-1eb0f85df9eb
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_noor_5_klik
|
|
to: 'on'
|
|
id: aan
|
|
- platform: state
|
|
entity_id: input_button.verwarming_1u_noor
|
|
to: 'on'
|
|
id: aan
|
|
- platform: time
|
|
at: input_datetime.slaapkamer_noor_verwarming_end_time
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.noor
|
|
data:
|
|
preset_mode: comfort
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=3600) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.slaapkamer_noor_verwarming_end_time
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.noor
|
|
data:
|
|
preset_mode: away
|
|
- alias: Knop Noor klik
|
|
id: 41167ec0-0d4e-4d94-808a-ff94da618d3b
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_noor_klik
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.noor") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.noor
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.noor
|
|
brightness: 255
|
|
- alias: Verwarming Badkamer Aan/Uit
|
|
id: 73b8bdfe-8f03-480b-8827-54599586b3b3
|
|
trigger:
|
|
- platform: time
|
|
at: 06:02
|
|
- platform: time
|
|
at: 00:30
|
|
actions:
|
|
- action: "{% if now().hour == 6 %}\n automation.turn_on\n{% else %}\n automation.turn_off\n\
|
|
{% endif %}\n"
|
|
entity_id: automation.verwarming_bij_aanwezigheid_badkamer
|
|
- condition: template
|
|
value_template: '{{now().hour != 6}}'
|
|
- action: climate.set_temperature
|
|
entity_id: climate.badkamer
|
|
data:
|
|
temperature: 10
|
|
- alias: Verwarming Fien Aan/Uit
|
|
id: 98518b24-44a5-4878-839f-d23dd4e3390f
|
|
trigger:
|
|
- platform: time
|
|
at: 06:02
|
|
- platform: time
|
|
at: '22:00'
|
|
actions:
|
|
- action: "{% if now().hour == 6 %}\n automation.turn_on\n{% else %}\n automation.turn_off\n\
|
|
{% endif %}\n"
|
|
entity_id: automation.verwarming_bij_aanwezigheid_fien
|
|
- condition: template
|
|
value_template: '{{now().hour != 6}}'
|
|
- action: climate.set_temperature
|
|
entity_id: climate.fien
|
|
data:
|
|
temperature: 10
|
|
- alias: Verwarming Noor Aan/Uit
|
|
id: 9d7c82a3-25c9-4fce-9ff0-d857ee188cb4
|
|
trigger:
|
|
- platform: time
|
|
at: 06:02
|
|
- platform: time
|
|
at: '22:00'
|
|
actions:
|
|
- action: "{% if now().hour == 6 %}\n automation.turn_on\n{% else %}\n automation.turn_off\n\
|
|
{% endif %}\n"
|
|
entity_id: automation.verwarming_bij_aanwezigheid_noor
|
|
- condition: template
|
|
value_template: '{{now().hour != 6}}'
|
|
- action: climate.set_temperature
|
|
entity_id: climate.noor
|
|
data:
|
|
temperature: 10
|
|
- alias: Verwarming Slaapkamer Aan/Uit
|
|
id: 4231743f-fe60-4208-96b7-fc82b9246691
|
|
trigger:
|
|
- platform: time
|
|
at: 06:02
|
|
- platform: time
|
|
at: 00:30
|
|
actions:
|
|
- action: "{% if now().hour == 6 %}\n automation.turn_on\n{% else %}\n automation.turn_off\n\
|
|
{% endif %}\n"
|
|
entity_id: automation.verwarming_bij_aanwezigheid_slaapkamer
|
|
- condition: template
|
|
value_template: '{{now().hour != 6}}'
|
|
- action: climate.set_temperature
|
|
entity_id: climate.slaapkamer
|
|
data:
|
|
temperature: 10
|
|
- alias: Verwarming garage Aan/Uit
|
|
id: ce345a61-9254-48d5-88ce-060b3a5bfcbc
|
|
trigger:
|
|
- platform: template
|
|
value_template: '{{ now().weekday() == 4 and now().hour == 14 }}'
|
|
- platform: template
|
|
value_template: '{{ now().weekday() == 6 and now().hour == 23 }}'
|
|
actions:
|
|
- action: "{% if now().weekday() == 4 %}\n automation.turn_on\n{% else %}\n automation.turn_off\n\
|
|
{% endif %}\n"
|
|
entity_id: automation.verwarming_bij_aanwezigheid_garage
|
|
- action: climate.set_hvac_mode
|
|
entity_id: climate.garage
|
|
data:
|
|
hvac_mode: 'off'
|
|
- alias: Light gang hal
|
|
id: 169e30a6-8d76-4193-83db-a362b6ebca25
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: light.gang_boven
|
|
from: 'on'
|
|
to: 'off'
|
|
id: uit
|
|
- platform: state
|
|
entity_id: light.gang_boven
|
|
from: 'off'
|
|
to: 'on'
|
|
id: aan
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
sequence:
|
|
- action: light.turn_off
|
|
data:
|
|
entity_id: light.gang_hal
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.giel_thuis_nacht
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.martine_thuis_nacht
|
|
state: 'on'
|
|
sequence:
|
|
- action: light.turn_on
|
|
data:
|
|
brightness_pct: 1
|
|
target:
|
|
entity_id: light.gang_hal
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
brightness_pct: 70
|
|
target:
|
|
entity_id: light.gang_hal
|
|
- alias: Deurbel
|
|
id: ad40debe-bbaf-43a9-8181-168321d2fa25
|
|
description: De deurbel mag niet gaan wanneer er iemand slaapt na de nacht
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
condition: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
sequence:
|
|
- action: switch.turn_on
|
|
entity_id:
|
|
- switch.deurbel_actief
|
|
default:
|
|
- action: switch.turn_off
|
|
entity_id: switch.deurbel_actief
|
|
mode: single
|
|
- alias: Verlichting bij schemer
|
|
id: 378bbd67-0626-492d-b091-7f18ae68b8f6
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
actions:
|
|
- action: "{% if is_state('sensor.dark_inside', 'true') %}\n light.turn_on\n{%\
|
|
\ else %}\n light.turn_off\n{% endif %}\n"
|
|
entity_id:
|
|
- light.trap
|
|
- light.led_knop_noor
|
|
- light.led_knop_fien
|
|
- light.led_knop_giel
|
|
- light.led_knop_martine
|
|
- alias: Licht hof aan
|
|
id: 25632745-3abf-4ae9-a64e-181845b9dec6
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
to: Juist Aangekomen
|
|
id: just_arrived
|
|
- platform: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
to: Juist Aangekomen
|
|
id: just_arrived
|
|
- platform: state
|
|
entity_id: device_tracker.noor_not_so_binary
|
|
to: Juist Aangekomen
|
|
id: just_arrived
|
|
- platform: state
|
|
entity_id: device_tracker.fien_not_so_binary
|
|
to: Juist Aangekomen
|
|
id: just_arrived
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_achterdeur
|
|
to: 'on'
|
|
id: door
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_deur
|
|
id: door
|
|
- platform: state
|
|
entity_id: binary_sensor.tuin_bezetting
|
|
to: 'on'
|
|
id: occupancy
|
|
- platform: state
|
|
entity_id: binary_sensor.poort
|
|
to: 'on'
|
|
id: door
|
|
condition:
|
|
- condition: state
|
|
entity_id: sensor.dark_outside
|
|
state: 'true'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- alias: Tussen 00u en 7u
|
|
condition: time
|
|
after: 00:00:00
|
|
before: 07:00:00
|
|
sequence:
|
|
- action: light.turn_on
|
|
data:
|
|
brightness_pct: 60
|
|
target:
|
|
entity_id: light.alle_tuinverlichting
|
|
- choose:
|
|
- conditions:
|
|
- alias: Volk in den hof
|
|
condition: state
|
|
entity_id: binary_sensor.tuin_bezetting
|
|
state: 'on'
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(hours=2) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.alle_tuinverlichting_end_time
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.tuin_bezetting
|
|
from: 'on'
|
|
to: 'off'
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.alle_tuinverlichting_end_time
|
|
- conditions:
|
|
- condition: trigger
|
|
id: just_arrived
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.alle_tuinverlichting_end_time
|
|
default:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=60) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.alle_tuinverlichting_end_time
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
brightness_pct: 100
|
|
target:
|
|
entity_id: light.alle_tuinverlichting
|
|
- choose:
|
|
- conditions:
|
|
- alias: Volk in den hof
|
|
condition: state
|
|
entity_id: binary_sensor.tuin_bezetting
|
|
state: 'on'
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(hours=2) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.alle_tuinverlichting_end_time
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.tuin_bezetting
|
|
from: 'on'
|
|
to: 'off'
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.alle_tuinverlichting_end_time
|
|
- conditions:
|
|
- condition: trigger
|
|
id: just_arrived
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.alle_tuinverlichting_end_time
|
|
default:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=60) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.alle_tuinverlichting_end_time
|
|
- alias: Doorbell Notifications
|
|
id: 642ea33c-f454-4b4c-a4bb-12ecb35d6868
|
|
trigger:
|
|
platform: state
|
|
entity_id: switch.deurbel
|
|
to: 'on'
|
|
actions:
|
|
- action: media_player.play_media
|
|
continue_on_error: true
|
|
target:
|
|
entity_id:
|
|
- media_player.mass_keuken
|
|
- media_player.mass_2c
|
|
- media_player.mass_move
|
|
- media_player.mass_living_2
|
|
data:
|
|
announce: true
|
|
media_content_type: music
|
|
extra:
|
|
volume: 65
|
|
media_content_id: https://www.soundjay.com/door/doorbell-1.mp3
|
|
- delay:
|
|
seconds: 10
|
|
- alias: Donker buiten lowpass
|
|
id: e80c2c9b-06b3-45f0-b6c2-aac9fb531612
|
|
mode: parallel
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ states(\"sensor.huidige_opbrengst\") | int(0) < 100 and \n\
|
|
\ states(\"sensor.buiten_lichtsterkte\") | int(0) < 950 }}\n"
|
|
for:
|
|
minutes: 5
|
|
id: binnen
|
|
- platform: template
|
|
value_template: "{{ states(\"sensor.huidige_opbrengst\") | int(0) < 2 and\n states(\"\
|
|
sensor.buiten_lichtsterkte\") | int(0) < 150 }}\n"
|
|
for:
|
|
minutes: 15
|
|
id: buiten
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
below: 1100
|
|
for:
|
|
minutes: 5
|
|
id: binnen
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
below: 150
|
|
for:
|
|
minutes: 5
|
|
id: buiten
|
|
- platform: numeric_state
|
|
entity_id: sun.sun
|
|
value_template: '{{ state.attributes.elevation }}'
|
|
below: 0.0
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: buiten
|
|
sequence:
|
|
- action: input_boolean.turn_on
|
|
entity_id:
|
|
- input_boolean.donker_buiten_lowpass
|
|
- conditions:
|
|
- condition: trigger
|
|
id: binnen
|
|
sequence:
|
|
- action: input_boolean.turn_on
|
|
entity_id:
|
|
- input_boolean.donker_binnen_lowpass
|
|
default:
|
|
- action: input_boolean.turn_on
|
|
entity_id:
|
|
- input_boolean.donker_buiten_lowpass
|
|
- input_boolean.donker_binnen_lowpass
|
|
- alias: Control excess control droogkast
|
|
id: ca57e527-62bd-4eb2-8a93-0e33fde89bde
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- switch.droogkast
|
|
to: 'off'
|
|
from: 'on'
|
|
id: switch
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.droogkast_staat_op
|
|
to: 'off'
|
|
id: automation
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.droogkast
|
|
state: 'off'
|
|
- condition: trigger
|
|
id: switch
|
|
sequence:
|
|
- service: automation.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: automation.droogkast_optimizer
|
|
- conditions:
|
|
- condition: trigger
|
|
id: automation
|
|
sequence:
|
|
- service: automation.turn_off
|
|
data:
|
|
stop_actions: false
|
|
target:
|
|
entity_id: automation.droogkast_optimizer
|
|
mode: single
|
|
- alias: Emhass afwasmachien
|
|
id: 13c7e741-1dd2-4bd4-9c03-d6060176b9c6
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.emhass_afwasmachien
|
|
above: 1
|
|
- platform: state
|
|
entity_id: binary_sensor.afwasmachien_staat_op
|
|
to: 'off'
|
|
id: turn_off
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.afwasmachien
|
|
state: 'off'
|
|
- condition: numeric_state
|
|
entity_id: sensor.emhass_afwasmachien
|
|
above: 1
|
|
sequence:
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: switch.afwasmachien
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: input_boolean.emhass_afwasmachien
|
|
- conditions:
|
|
- condition: trigger
|
|
id: turn_off
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_afwasmachien
|
|
state: 'on'
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.afwasmachien_starten
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.emhass_afwasmachien
|
|
- condition: template
|
|
value_template: "{{ states(\"input_boolean.emhass_wasmachien\") == \"off\"\
|
|
\ and \n states(\"input_boolean.emhass_droogkast\") == \"off\" and \n\
|
|
\ states(\"input_boolean.emhass_afwasmachien\") == \"off\"}}\n"
|
|
- alias: EMHASS data
|
|
id: 684e7c96-7eb8-41fa-b81c-e3c97e234b56
|
|
trigger:
|
|
- platform: time
|
|
at: 01:31:00
|
|
id: fit
|
|
- platform: time
|
|
at: '23:42:00'
|
|
id: dayahead
|
|
- platform: time
|
|
at: 06:02:00
|
|
id: prediction
|
|
- platform: time_pattern
|
|
minutes: /5
|
|
id: day
|
|
- platform: time_pattern
|
|
minutes: 29
|
|
id: night
|
|
- platform: homeassistant
|
|
event: start
|
|
id: start
|
|
- platform: time
|
|
at: input_datetime.emhass_data
|
|
id: data
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: data
|
|
sequence:
|
|
- action: rest_command.publish_data
|
|
data:
|
|
prefix: ''
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_testen
|
|
state: 'on'
|
|
- action: rest_command.publish_data_test
|
|
data:
|
|
prefix: ''
|
|
- conditions:
|
|
- condition: trigger
|
|
id: dayahead
|
|
sequence:
|
|
- action: rest_command.dayahead_optim
|
|
- delay:
|
|
seconds: 5
|
|
- action: rest_command.publish_data
|
|
data:
|
|
prefix: dh_
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_testen
|
|
state: 'on'
|
|
- action: rest_command.dayahead_optim_test
|
|
- delay:
|
|
seconds: 5
|
|
- action: rest_command.publish_data_test
|
|
data:
|
|
prefix: dh_
|
|
- conditions:
|
|
- condition: trigger
|
|
id: night
|
|
- alias: snachts
|
|
condition: template
|
|
value_template: '{{ now().hour is in [0, 1, 2, 3, 4, 5] }}
|
|
|
|
'
|
|
sequence:
|
|
- delay:
|
|
seconds: 2
|
|
- action: rest_command.naive_mpc_optim
|
|
data:
|
|
payload: '{{ state_attr("sensor.emhass_mpc", "mpc") }}
|
|
|
|
'
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=5) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.emhass_data
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_testen
|
|
state: 'on'
|
|
- action: rest_command.naive_mpc_optim_test
|
|
- conditions:
|
|
- condition: trigger
|
|
id: day
|
|
- alias: overdag
|
|
condition: template
|
|
value_template: '{{ now().hour is in [6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
16, 17, 18, 19, 20, 21, 22, 23] }}
|
|
|
|
'
|
|
sequence:
|
|
- delay:
|
|
seconds: 2
|
|
- action: rest_command.naive_mpc_optim
|
|
data:
|
|
payload: '{{ state_attr("sensor.emhass_mpc", "mpc") }}
|
|
|
|
'
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=5) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.emhass_data
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_testen
|
|
state: 'on'
|
|
- action: rest_command.naive_mpc_optim_test
|
|
- conditions:
|
|
- condition: trigger
|
|
id: fit
|
|
sequence:
|
|
- action: rest_command.forecast_model_fit_load_zonder_wp
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_testen
|
|
state: 'on'
|
|
- action: rest_command.forecast_model_fit_load_zonder_wp_test
|
|
- conditions:
|
|
- condition: trigger
|
|
id: start
|
|
sequence:
|
|
- action: rest_command.publish_data
|
|
data:
|
|
prefix: ''
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_testen
|
|
state: 'on'
|
|
- action: rest_command.publish_data_test
|
|
data:
|
|
prefix: ''
|
|
- conditions:
|
|
- condition: trigger
|
|
id: prediction
|
|
sequence:
|
|
- action: rest_command.fit_heating_hours
|
|
- delay:
|
|
seconds: 14
|
|
- action: rest_command.predict_heating_hours
|
|
- delay:
|
|
seconds: 4
|
|
- action: rest_command.fit_heating_hours_gradientboosting
|
|
- delay:
|
|
seconds: 14
|
|
- action: rest_command.predict_heating_hours_gradientboosting
|
|
- delay:
|
|
seconds: 4
|
|
- action: rest_command.fit_heating_hours_adaboost
|
|
- delay:
|
|
seconds: 14
|
|
- action: rest_command.predict_heating_hours_adaboost
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_testen
|
|
state: 'on'
|
|
- action: rest_command.fit_heating_hours_test
|
|
- delay:
|
|
seconds: 14
|
|
- action: rest_command.predict_heating_hours_test
|
|
- alias: Emhass droogkast
|
|
id: ca1bfea1-3d3f-4082-a57a-2ad5db0cc6c6
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.emhass_droogkast
|
|
above: 1
|
|
- platform: state
|
|
entity_id: binary_sensor.droogkast_staat_op
|
|
to: 'off'
|
|
id: turn_off
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.droogkast
|
|
state: 'off'
|
|
- condition: numeric_state
|
|
entity_id: sensor.emhass_droogkast
|
|
above: 1
|
|
sequence:
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: switch.droogkast
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: input_boolean.emhass_droogkast
|
|
- conditions:
|
|
- condition: trigger
|
|
id: turn_off
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_droogkast
|
|
state: 'on'
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.droogkast_starten
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.emhass_droogkast
|
|
- condition: template
|
|
value_template: "{{ states(\"input_boolean.emhass_wasmachien\") == \"off\"\
|
|
\ and \n states(\"input_boolean.emhass_droogkast\") == \"off\" and \n\
|
|
\ states(\"input_boolean.emhass_afwasmachien\") == \"off\"}}\n"
|
|
- alias: Emhass ios action
|
|
id: f4a344eb-a2df-4d4e-aa33-fbbeec23fa89
|
|
mode: parallel
|
|
trigger:
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: 16u
|
|
event_data:
|
|
action: 16U
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: 7u
|
|
event_data:
|
|
action: 7U
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: asap
|
|
event_data:
|
|
action: ASAP
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: nasap
|
|
event_data:
|
|
action: NASAP
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: choose
|
|
event_data:
|
|
action: CHOOSE
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: vandaag
|
|
event_data:
|
|
action: VANDAAG
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
id: morgen
|
|
event_data:
|
|
action: MORGEN
|
|
actions:
|
|
- variables:
|
|
who: "{% if trigger.event.context.user_id == '14a0b456772941eda81466d1807619b7'\
|
|
\ -%}\n notify.mobile_app_gphone\n{% elif trigger.event.context.user_id ==\
|
|
\ 'db0ab875181d4af887c161d094fd9da4' -%}\n notify.mobile_app_mphone\n{% else\
|
|
\ -%}\n notify.iedereen\n{% endif -%}\n"
|
|
datetime: "{% set wasmachien = as_timestamp(states.input_button.wasmachien.last_changed)\
|
|
\ -%} {% set droogkast = as_timestamp(states.input_button.droogkast.last_changed)\
|
|
\ -%} {% set afwasmachien = as_timestamp(states.input_button.afwasmachien.last_changed)\
|
|
\ -%}\n{% set maximum = max(wasmachien, droogkast, afwasmachien) -%} {% if\
|
|
\ maximum == wasmachien -%}\n input_datetime.emhass_wasmachien_end_time\n\
|
|
{% elif maximum == droogkast -%}\n input_datetime.emhass_droogkast_end_time\n\
|
|
{% else -%}\n input_datetime.emhass_afwasmachien_end_time\n{% endif -%}\n"
|
|
boolean: "{% set wasmachien = as_timestamp(states.input_button.wasmachien.last_changed)\
|
|
\ -%} {% set droogkast = as_timestamp(states.input_button.droogkast.last_changed)\
|
|
\ -%} {% set afwasmachien = as_timestamp(states.input_button.afwasmachien.last_changed)\
|
|
\ -%}\n{% set maximum = max(wasmachien, droogkast, afwasmachien) -%} {% if\
|
|
\ maximum == wasmachien -%}\n input_boolean.wasmachien_starten\n{% elif maximum\
|
|
\ == droogkast -%}\n input_boolean.droogkast_starten\n{% else -%}\n input_boolean.afwasmachien_starten\n\
|
|
{% endif -%}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: 16u
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
target:
|
|
entity_id: '{{ datetime }}
|
|
|
|
'
|
|
data:
|
|
datetime: "{% set hour = now().hour -%} {% if hour < 14 -%}\n {% set date\
|
|
\ = now().strftime('%Y-%m-%d') -%}\n{% else -%}\n {% set date = ((as_timestamp(now())\
|
|
\ + 86400) | as_datetime | as_local).strftime('%Y-%m-%d') -%}\n{% endif\
|
|
\ -%} {{ date + \" 16:00:00\" }}\n"
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: '{{ boolean }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: 7u
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
target:
|
|
entity_id: '{{ datetime }}
|
|
|
|
'
|
|
data:
|
|
datetime: "{% set hour = now().hour -%} {% if hour < 5 -%}\n {% set date\
|
|
\ = now().strftime('%Y-%m-%d') -%}\n{% else -%}\n {% set date = ((as_timestamp(now())\
|
|
\ + 86400) | as_datetime | as_local).strftime('%Y-%m-%d') -%}\n{% endif\
|
|
\ -%} {{ date + \" 07:00:00\" }}\n"
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: '{{ boolean }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: asap
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
target:
|
|
entity_id: '{{ datetime }}
|
|
|
|
'
|
|
data:
|
|
datetime: "{% if datetime == \"input_datetime.emhass_afwasmachien_end_time\"\
|
|
\ -%}\n {% set offset = 9600 -%}\n {% set now_ts = as_timestamp(now())\
|
|
\ + offset -%}\n {% set dt = now_ts | as_datetime | as_local -%}\n {%\
|
|
\ set rounded_minute = ((dt.minute + 4) // 5) * 5 -%}\n {% set dt = dt.replace(minute=0,\
|
|
\ second=0, microsecond=0) + timedelta(minutes=rounded_minute) -%}\n{%\
|
|
\ else -%}\n {% set offset = 7800 -%}\n {% set now_ts = as_timestamp(now())\
|
|
\ + offset -%}\n {% set dt = now_ts | as_datetime | as_local -%}\n {%\
|
|
\ set rounded_minute = ((dt.minute + 4) // 5) * 5 -%}\n {% set dt = dt.replace(minute=0,\
|
|
\ second=0, microsecond=0) + timedelta(minutes=rounded_minute) -%}\n{%\
|
|
\ endif -%} {{ dt.strftime('%Y-%m-%d %H:%M:%S') }}\n"
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: '{{ boolean }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: nasap
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
target:
|
|
entity_id: '{{ datetime }}
|
|
|
|
'
|
|
data:
|
|
datetime: '{% set offset = 77400 -%} {% set now_ts = as_timestamp(now())
|
|
+ offset -%} {% set dt = now_ts | as_datetime | as_local -%} {% set rounded_minute
|
|
= ((dt.minute + 4) // 5) * 5 -%} {% set dt = dt.replace(minute=0, second=0,
|
|
microsecond=0) + timedelta(minutes=rounded_minute) -%} {{ dt.strftime(''%Y-%m-%d
|
|
%H:%M:%S'') }}
|
|
|
|
'
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: '{{ boolean }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: choose
|
|
sequence:
|
|
- action: '{{ who }}'
|
|
data:
|
|
message: Vandaag/morgen
|
|
data:
|
|
actions:
|
|
- action: VANDAAG
|
|
title: Vandaag nog.
|
|
- action: MORGEN
|
|
title: Tegen morgen.
|
|
- delay:
|
|
seconds: 20
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: '{{ boolean }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: vandaag
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
target:
|
|
entity_id: '{{ datetime }}
|
|
|
|
'
|
|
data:
|
|
datetime: '{% set time = now().strftime(''%Y-%m-%d %H:%M:00'') -%} {{ time
|
|
}}
|
|
|
|
'
|
|
- action: '{{ who }}'
|
|
data:
|
|
message: Kies het juiste uur.
|
|
data:
|
|
url: /lovelace/eindtijden
|
|
- conditions:
|
|
- condition: trigger
|
|
id: morgen
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
target:
|
|
entity_id: '{{ datetime }}
|
|
|
|
'
|
|
data:
|
|
datetime: '{% set date = ((as_timestamp(now()) + 86400) | as_datetime |
|
|
as_local).strftime(''%Y-%m-%d'') -%} {{ date + " 06:00:00" }}
|
|
|
|
'
|
|
- action: '{{ who }}'
|
|
data:
|
|
message: Kies het juiste uur.
|
|
data:
|
|
url: /lovelace/eindtijden
|
|
- alias: Emhass mag gestart worden
|
|
id: e1b7948d-f045-4c61-8155-8d15b13bdc1a
|
|
mode: restart
|
|
description: ''
|
|
trigger:
|
|
- platform: event
|
|
event_type: state_changed
|
|
event_data:
|
|
entity_id: input_button.wasmachien
|
|
id: wasmachien
|
|
- platform: event
|
|
event_type: state_changed
|
|
event_data:
|
|
entity_id: input_button.droogkast
|
|
id: droogkast
|
|
- platform: event
|
|
event_type: state_changed
|
|
event_data:
|
|
entity_id: input_button.afwasmachien
|
|
id: afwasmachien
|
|
condition: []
|
|
actions:
|
|
- variables:
|
|
who: "{% if trigger.event.context.user_id == '14a0b456772941eda81466d1807619b7'\
|
|
\ %}\n notify.mobile_app_gphone\n{% elif trigger.event.context.user_id ==\
|
|
\ 'db0ab875181d4af887c161d094fd9da4' %}\n notify.mobile_app_mphone\n{% else\
|
|
\ %}\n notify.iedereen\n{% endif %}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: wasmachien
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ states(\"input_boolean.wasmachien_starten\") == \"\
|
|
on\" \n and states(\"input_boolean.emhass_wasmachien\") != \"on\"\
|
|
\ }}\n"
|
|
sequence:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.wasmachien
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.wasmachien_starten
|
|
default:
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.wasmachien_staat_op
|
|
- delay:
|
|
seconds: 1
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.wasmachien
|
|
- action: '{{ who }}'
|
|
data:
|
|
message: Wanneer moet het wasmachien klaar zijn?
|
|
data:
|
|
actions:
|
|
- action: 16U
|
|
title: Tegen 16u.
|
|
- action: 7U
|
|
title: Tegen 7u.
|
|
- action: ASAP
|
|
title: Zo snel mogelijk.
|
|
- action: NASAP
|
|
title: Het maakt niet uit.
|
|
- action: CHOOSE
|
|
title: Zelf een uur kiezen.
|
|
- conditions:
|
|
- condition: trigger
|
|
id: afwasmachien
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ states(\"input_boolean.afwasmachien_starten\") ==\
|
|
\ \"on\" \n and states(\"input_boolean.emhass_afwasmachien\") !=\
|
|
\ \"on\" }}\n"
|
|
sequence:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.afwasmachien
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.afwasmachien_starten
|
|
default:
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.afwasmachien_staat_op
|
|
- delay:
|
|
seconds: 1
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.afwasmachien
|
|
- action: '{{ who }}'
|
|
data:
|
|
message: Wanneer moet het afwasmachien klaar zijn?
|
|
data:
|
|
actions:
|
|
- action: 16U
|
|
title: Tegen 16u.
|
|
- action: 7U
|
|
title: Tegen 7u.
|
|
- action: ASAP
|
|
title: Zo snel mogelijk.
|
|
- action: NASAP
|
|
title: Maakt niet uit.
|
|
- action: CHOOSE
|
|
title: Zelf een uur kiezen.
|
|
- conditions:
|
|
- condition: trigger
|
|
id: droogkast
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ states(\"input_boolean.droogkast_starten\") == \"\
|
|
on\" \n and states(\"input_boolean.emhass_droogkast\") != \"on\"\
|
|
\ }}\n"
|
|
sequence:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.droogkast
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.droogkast_starten
|
|
default:
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.droogkast_staat_op
|
|
- delay:
|
|
seconds: 1
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.droogkast
|
|
- action: '{{ who }}'
|
|
data:
|
|
message: Wanneer moet de droogkast klaar zijn?
|
|
data:
|
|
actions:
|
|
- action: 16U
|
|
title: Tegen 16u.
|
|
- action: 7U
|
|
title: Tegen 7u.
|
|
- action: ASAP
|
|
title: Zo snel mogelijk.
|
|
- action: NASAP
|
|
title: Maakt niet uit.
|
|
- action: CHOOSE
|
|
title: Zelf een uur kiezen.
|
|
- alias: Emhass warmtepomp
|
|
id: c5057565-f78b-478b-b9db-d7659b3caf72
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.emhass_warmtepomp
|
|
above: 1
|
|
- platform: numeric_state
|
|
entity_id: sensor.emhass_warmtepomp
|
|
below: 0.1
|
|
for:
|
|
minutes: 5
|
|
seconds: 30
|
|
- platform: template
|
|
value_template: '{{ as_timestamp(now()) - as_timestamp(states("sensor.uptime"))
|
|
> 60 }}
|
|
|
|
'
|
|
- platform: event
|
|
event_type: automation_reloaded
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.emhass_warmtepomp
|
|
above: 1
|
|
sequence:
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: input_boolean.emhass_warmtepomp
|
|
- condition: state
|
|
entity_id: binary_sensor.warmtepomp_aan_delay_off
|
|
state: 'off'
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: switch.verwarming
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.emhass_warmtepomp
|
|
below: 1
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.emhass_warmtepomp
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: switch.verwarming
|
|
- alias: Emhass warmtepompboiler
|
|
id: 2dbe7701-5976-4ce8-aaad-0298d80cb019
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.emhass_warmtepompboiler
|
|
above: 1
|
|
- platform: numeric_state
|
|
entity_id: sensor.emhass_warmtepompboiler
|
|
below: 0.1
|
|
for:
|
|
minutes: 4
|
|
- platform: template
|
|
value_template: '{{ as_timestamp(now()) - as_timestamp(states("sensor.uptime"))
|
|
> 60 }}
|
|
|
|
'
|
|
- platform: event
|
|
event_type: automation_reloaded
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.emhass_warmtepompboiler
|
|
above: 1
|
|
sequence:
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: input_boolean.emhass_warmtepompboiler
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: switch.warm_water
|
|
- condition: state
|
|
entity_id: binary_sensor.warmtepompboiler_aan_delay_off
|
|
state: 'off'
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: switch.warm_water_snel
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.emhass_warmtepompboiler
|
|
below: 1
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id:
|
|
- input_boolean.emhass_warmtepompboiler
|
|
- switch.warm_water
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: switch.warm_water
|
|
- alias: Emhass wasmachien
|
|
id: c5897903-93c6-4ca5-8235-4e7fac626b2e
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.emhass_wasmachien
|
|
above: 1
|
|
- platform: state
|
|
entity_id: binary_sensor.wasmachien_staat_op
|
|
to: 'off'
|
|
id: turn_off
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.wasmachien
|
|
state: 'off'
|
|
- condition: numeric_state
|
|
entity_id: sensor.emhass_wasmachien
|
|
above: 1
|
|
sequence:
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: switch.wasmachien
|
|
- action: homeassistant.turn_on
|
|
target:
|
|
entity_id: input_boolean.emhass_wasmachien
|
|
- conditions:
|
|
- condition: trigger
|
|
id: turn_off
|
|
- condition: state
|
|
entity_id: input_boolean.emhass_wasmachien
|
|
state: 'on'
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.wasmachien_starten
|
|
- action: homeassistant.turn_off
|
|
target:
|
|
entity_id: input_boolean.emhass_wasmachien
|
|
- condition: template
|
|
value_template: "{{ states(\"input_boolean.emhass_wasmachien\") == \"off\"\
|
|
\ and \n states(\"input_boolean.emhass_droogkast\") == \"off\" and \n\
|
|
\ states(\"input_boolean.emhass_afwasmachien\") == \"off\"}}\n"
|
|
- alias: Enable cpu sensors
|
|
description: Enable de unifi cpu sensors And reload Netatmo.
|
|
id: 2c771c0d-4d36-4678-bc2a-3b93c6d38ce5
|
|
mode: parallel
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
actions:
|
|
- delay:
|
|
seconds: 60
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ states(\"climate.living\") == \"unavailable\" or\n states(\"\
|
|
climate.living\") == \"unknown\" }}\n"
|
|
then:
|
|
- action: homeassistant.reload_config_entry
|
|
data:
|
|
entry_id: '{{ config_entry_id(''climate.living'') }}
|
|
|
|
'
|
|
target:
|
|
entity_id: climate.living
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ states(\"sensor.unifi_media_vermogen\") == \"unavailable\"\
|
|
\ or\n states(\"sensor.unifi_media_vermogen\") == \"unknown\" or\n states(\"\
|
|
sensor.unifi_waskot_vermogen\") == \"unavailable\" or\n states(\"sensor.unifi_waskot_vermogen\"\
|
|
) == \"unknown\" }}\n"
|
|
then:
|
|
- action: homeassistant.enable_entity
|
|
data:
|
|
entity_id:
|
|
- sensor.usw_24_poe_waskot_cpu_utilization
|
|
- sensor.usw_lite_8_cpu_utilization
|
|
- alias: End times
|
|
id: 85d4b37a-ed73-4a55-8b71-99e3cb74f7ec
|
|
mode: parallel
|
|
trigger:
|
|
- platform: time
|
|
at: input_datetime.verluchting_end_time
|
|
id: verluchting
|
|
- platform: time
|
|
at: input_datetime.luchtdroger_end_time
|
|
id: luchtdroger
|
|
- platform: time
|
|
at: input_datetime.alle_tuinverlichting_end_time
|
|
id: den_hof
|
|
- platform: time
|
|
at: input_datetime.afdak_verlichting_end_time
|
|
id: afdak
|
|
- platform: time
|
|
at: input_datetime.keuken_end_time
|
|
id: keuken
|
|
- platform: time
|
|
at: input_datetime.slaapkamer_noor_verlichting_end_time
|
|
id: noor
|
|
- platform: time
|
|
at: input_datetime.slaapkamer_fien_verlichting_end_time
|
|
id: fien
|
|
- platform: time
|
|
at: input_datetime.wled_noor_end_time
|
|
id: noorwled
|
|
- platform: time
|
|
at: input_datetime.wled_fien_end_time
|
|
id: fienwled
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: verluchting
|
|
sequence:
|
|
- action: switch.turn_off
|
|
entity_id: switch.verluchting
|
|
- action: switch.turn_off
|
|
entity_id: switch.badkamer_verluchting
|
|
- action: switch.turn_off
|
|
entity_id: switch.zolder_verluchting
|
|
- conditions:
|
|
- condition: trigger
|
|
id: luchtdroger
|
|
sequence:
|
|
- action: switch.turn_off
|
|
entity_id: switch.luchtdroger
|
|
- conditions:
|
|
- condition: trigger
|
|
id: den_hof
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.alle_tuinverlichting
|
|
- conditions:
|
|
- condition: trigger
|
|
id: afdak
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.afdak_verlichting
|
|
- conditions:
|
|
- condition: trigger
|
|
id: keuken
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.keuken_inkom
|
|
- light.keuken_luster
|
|
- light.keuken_spots
|
|
- conditions:
|
|
- condition: trigger
|
|
id: noor
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.noor
|
|
- conditions:
|
|
- condition: trigger
|
|
id: fien
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.fien
|
|
- conditions:
|
|
- condition: trigger
|
|
id: noorwled
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.wled_noor
|
|
- conditions:
|
|
- condition: trigger
|
|
id: fienwled
|
|
sequence:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.wled_fien
|
|
- alias: Herstarten esp
|
|
id: d84866ff-f214-4b50-b521-6fadca16c6f9
|
|
mode: parallel
|
|
trigger:
|
|
- platform: numeric_state
|
|
above: 0
|
|
entity_id: sensor.esphome_restarts
|
|
for:
|
|
seconds: 65
|
|
actions:
|
|
- repeat:
|
|
for_each: '{{ state_attr("sensor.esphome_restarts", "list") }}
|
|
|
|
'
|
|
sequence:
|
|
- action: persistent_notification.create
|
|
data:
|
|
message: "{% set unknown = expand(integration_entities('esphome')\n \
|
|
\ | select('match','sensor.')\n | reject('contains', '_energy'))\
|
|
\ \n | selectattr(\"state\", \"eq\", \"unknown\") \n | map(attribute=\"\
|
|
entity_id\") \n | list %}\n{{ device_attr(repeat.item, \"name\")\
|
|
\ }} is herstart omdat {{ unknown }} onbekend was\n"
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: '{{ repeat.item }}
|
|
|
|
'
|
|
- alias: Refresh 20m
|
|
id: 5af77f99-0597-427c-881f-5f71adafd7e4
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /20
|
|
condition: []
|
|
actions:
|
|
- event: refresh_20m
|
|
mode: single
|
|
- id: enable_facebook
|
|
alias: Enable Facebook
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowfacebook
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-facebook.txt
|
|
- id: disable_facebook
|
|
alias: Disable Facebook
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowfacebook
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-facebook.txt
|
|
name: Facebook
|
|
- alias: beveiliging verwarming fien
|
|
id: d40f8589-a6ec-43ab-a18d-2adf299d5e21
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /5
|
|
seconds: 0
|
|
condition:
|
|
condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.fien
|
|
state: 'on'
|
|
action:
|
|
- service: switch.turn_off
|
|
entity_id: switch.fien
|
|
- id: fien_block
|
|
alias: Fien block
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.fien_blocker
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/fien.txt
|
|
name: Fien
|
|
- id: fien_allow
|
|
alias: Fien allow
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.fien_blocker
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/fien.txt
|
|
- id: fien_block_all
|
|
alias: Fien block all
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.fien_blocker_all
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
name: Fien all
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/no_internet_fien.txt
|
|
- id: fien_allow_all
|
|
alias: Fien allow all
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.fien_blocker_all
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/no_internet_fien.txt
|
|
- id: fien_block_snapchat
|
|
alias: Fien block snapchat
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.fien_snapchat_blocker
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
name: Fien snapchat
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/fien_snapchat.txt
|
|
- id: fien_allow_snapchat
|
|
alias: Fien allow snapchat
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.fien_snapchat_blocker
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/fien_snapchat.txt
|
|
- alias: Poortje error off
|
|
id: 94bfe829-2f07-482d-b641-1b9cbfccc2e2
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.poort
|
|
- platform: state
|
|
entity_id: binary_sensor.poort_status
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.fotocel_poort_error
|
|
state: 'on'
|
|
actions:
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.fotocel_poort_error
|
|
- alias: Poortje error on
|
|
mode: single
|
|
id: 18e1f3ce-b09b-4133-9cbb-deaf01ce38a4
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.poort
|
|
to: 'on'
|
|
for:
|
|
minutes: 2
|
|
- platform: state
|
|
entity_id: binary_sensor.poort_status
|
|
to: 'off'
|
|
for:
|
|
minutes: 2
|
|
actions:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.fotocel_poort_error
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.alle_tuinverlichting
|
|
- action: notify.mobile_app_gphone
|
|
data_template:
|
|
title: Melding van Home-Assistant
|
|
message: Fotocel poort geblokkeerd? En den trigger was {{ trigger.entity_id
|
|
}}
|
|
data:
|
|
push:
|
|
sound: default
|
|
- delay:
|
|
seconds: 10
|
|
- alias: gang action
|
|
id: 6b406fef-f5c4-4f5a-8c95-f907fb74d67b
|
|
trigger:
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: GANG
|
|
actions:
|
|
- action: automation.turn_off
|
|
metadata: {}
|
|
data:
|
|
stop_actions: true
|
|
target:
|
|
entity_id: automation.gang_verklikker
|
|
- alias: Light garage garagedeur open
|
|
id: 9b86be0a-0d8e-4605-bfad-27f55017efd7
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_deur
|
|
from: 'on'
|
|
to: 'off'
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_deur
|
|
from: 'off'
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ states('binary_sensor.garage_deur') == \"off\" and \n\
|
|
\ states(\"binary_sensor.garage_bezetting\") == \"off\" }}\n"
|
|
sequence:
|
|
- action: light.turn_off
|
|
data:
|
|
entity_id: light.garage
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ states('binary_sensor.garage_deur') == \"off\" and \n\
|
|
\ states(\"binary_sensor.garage_bezetting\") == \"off\" and \n states(\"\
|
|
light.garage\") == \"off\" }}\n"
|
|
sequence:
|
|
- action: light.turn_off
|
|
data:
|
|
entity_id: light.garage
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ states('binary_sensor.garage_deur') == \"off\" and \n\
|
|
\ states(\"binary_sensor.garage_bezetting\") == \"on\" and \n states(\"\
|
|
light.garage\") == \"off\" }}\n"
|
|
sequence:
|
|
- action: light.turn_off
|
|
data:
|
|
entity_id: light.garage
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.garage
|
|
- id: enable_goplay
|
|
alias: Enable goplay
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowgoplay
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-goplay.txt
|
|
- id: disable_goplay
|
|
alias: Disable goplay
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowgoplay
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-goplay.txt
|
|
name: GoPlay
|
|
- alias: Heating csv
|
|
id: 157b1d57-73d9-4f39-82c6-13ce0cf4288a
|
|
trigger:
|
|
- platform: time
|
|
at: '23:59:32'
|
|
actions:
|
|
- action: notify.send_message
|
|
target:
|
|
entity_id: notify.prediction
|
|
data:
|
|
message: "{% set dd = states('sensor.degree_day_daily') |float %} {% set inside\
|
|
\ = states('sensor.gemiddelde_dagtemperatuur_binnen') |float %} {% set outside\
|
|
\ = states('sensor.gemiddelde_dagtemperatuur_buiten') |float %} {% set hour\
|
|
\ = states('sensor.branduren_warmtepomp_vandaag') |float | round(2) %} {%\
|
|
\ set kwhdd = states('sensor.kwh_per_degree_day_daily') |float %} {% set hourdd\
|
|
\ = states('sensor.uur_per_degree_day_daily') |float | round(2) %} {% set\
|
|
\ solar_total = states('sensor.opbrengst_kwh') |float %} {% set solar_total_yesterday\
|
|
\ = states('sensor.solar_csv_2') |float %} {% set solar = (states('sensor.opbrengst_kwh')\
|
|
\ |float - solar_total_yesterday) | round(3) %} {% set verwarming_total =\
|
|
\ states('sensor.warmtepomp_kwh') |float %} {% set verwarming_total_yesterday\
|
|
\ = states('sensor.verwarming_csv') |float %} {% set verwarming = (states('sensor.warmtepomp_kwh')\
|
|
\ |float - verwarming_total_yesterday) | round(3) %} {% set verbruik_total\
|
|
\ = states('sensor.verbruik_kwh') |float %} {% set verbruik_total_yesterday\
|
|
\ = states('sensor.verbruik_csv') |float %} {% set verbruik = (states('sensor.verbruik_kwh')\
|
|
\ |float - verbruik_total_yesterday) | round(3) %} {% set verbruik_zonder_verwarming\
|
|
\ = (verbruik - verwarming) | round(3) %} {% set time = now() %}\n\n {{time}},{{dd}},{{solar}},{{verbruik_zonder_verwarming}},{{hourdd}},{{inside}},{{outside}},{{hour}},{{kwhdd}},{{solar_total}},{{verwarming_total}},{{verwarming}},{{verbruik_total}},{{verbruik}}\n"
|
|
- action: notify.send_message
|
|
target:
|
|
entity_id: notify.prediction_share
|
|
data:
|
|
message: "{% set dd = states('sensor.degree_day_daily') |float %} {% set inside\
|
|
\ = states('sensor.gemiddelde_dagtemperatuur_binnen') |float %} {% set outside\
|
|
\ = states('sensor.gemiddelde_dagtemperatuur_buiten') |float %} {% set hour\
|
|
\ = states('sensor.branduren_warmtepomp_vandaag') |float | round(2) %} {%\
|
|
\ set kwhdd = states('sensor.kwh_per_degree_day_daily') |float %} {% set hourdd\
|
|
\ = states('sensor.uur_per_degree_day_daily') |float | round(2) %} {% set\
|
|
\ solar_total = states('sensor.opbrengst_kwh') |float %} {% set solar_total_yesterday\
|
|
\ = states('sensor.solar_csv_2') |float %} {% set solar = (states('sensor.opbrengst_kwh')\
|
|
\ |float - solar_total_yesterday) | round(3) %} {% set verwarming_total =\
|
|
\ states('sensor.warmtepomp_kwh') |float %} {% set verwarming_total_yesterday\
|
|
\ = states('sensor.verwarming_csv') |float %} {% set verwarming = (states('sensor.warmtepomp_kwh')\
|
|
\ |float - verwarming_total_yesterday) | round(3) %} {% set verbruik_total\
|
|
\ = states('sensor.verbruik_kwh') |float %} {% set verbruik_total_yesterday\
|
|
\ = states('sensor.verbruik_csv') |float %} {% set verbruik = (states('sensor.verbruik_kwh')\
|
|
\ |float - verbruik_total_yesterday) | round(3) %} {% set verbruik_zonder_verwarming\
|
|
\ = (verbruik - verwarming) | round(3) %} {% set time = now() %}\n\n {{time}},{{dd}},{{solar}},{{verbruik_zonder_verwarming}},{{hourdd}},{{inside}},{{outside}},{{hour}},{{kwhdd}},{{solar_total}},{{verwarming_total}},{{verwarming}},{{verbruik_total}},{{verbruik}}\n"
|
|
- alias: Garage ijskast Aan/Uit
|
|
id: b4140539-7c19-420e-ac35-2ead8e6e75aa
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.huidige_opbrengst
|
|
above: 600
|
|
- platform: time
|
|
at: '21:03:00'
|
|
actions:
|
|
- action: "{% if now().hour == 21 %}\n switch.turn_off\n{% else %}\n switch.turn_on\n\
|
|
{% endif %}\n"
|
|
entity_id: switch.garage_ijskast
|
|
- id: enable_instagram
|
|
alias: Enable Instagram
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowinstagram
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-instagram.txt
|
|
- id: disable_instagram
|
|
alias: Disable Instagram
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowinstagram
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-instagram.txt
|
|
name: Instagram
|
|
- alias: ios action alarm
|
|
id: cf9b58c3-421c-4798-95d0-86cd44799e4b
|
|
trigger:
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: ALARM
|
|
actions:
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.alarm
|
|
- alias: Ios action verlof
|
|
id: 5a8189fa-2338-4df0-9531-58207186427e
|
|
trigger:
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: VERLOF_AAN
|
|
id: aan
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: VERLOF_UIT
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
sequence:
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.op_verlof
|
|
default:
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.op_verlof
|
|
- alias: Alarm Beweging in den hof
|
|
id: 876bfadf-2974-45b4-ab29-35ce58d604be
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
to: triggered
|
|
actions:
|
|
- action: script.turn_on
|
|
data_template:
|
|
entity_id: "{% if is_state('device_tracker.bompa', 'home') or is_state('device_tracker.oma_2',\
|
|
\ 'home') %}\n script.melding\n{% else %}\n script.alarm_frigate\n{% endif\
|
|
\ %}\n"
|
|
- alias: Op verlof aan?
|
|
id: cae5ef81-fe21-499b-8827-734f6a99130c
|
|
mode: single
|
|
max_exceeded: silent
|
|
trigger:
|
|
- platform: state
|
|
entity_id: device_tracker.gphone_2
|
|
to: not_home
|
|
for:
|
|
hours: 4
|
|
- platform: state
|
|
entity_id: device_tracker.mphone_2
|
|
to: not_home
|
|
for:
|
|
hours: 4
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
state: armed_away
|
|
- condition: state
|
|
entity_id: device_tracker.gphone_2
|
|
state: not_home
|
|
- condition: state
|
|
entity_id: device_tracker.mphone_2
|
|
state: not_home
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.op_verlof'', ''off'') }}'
|
|
actions:
|
|
- action: notify.giel_en_martine
|
|
data_template:
|
|
message: Zijn jullie op vakantie vertrokken? Zet dan Vakantie-modus aan.
|
|
data:
|
|
actions:
|
|
- action: VERLOF_AAN
|
|
title: Vakantie-modus aan.
|
|
- action: VERLOF_UIT
|
|
title: Vakantie-modus uit.
|
|
- delay: 300
|
|
- alias: Op verlof uit?
|
|
id: 9e7e888f-8087-4e62-8fb6-2e7173c48b53
|
|
mode: single
|
|
max_exceeded: silent
|
|
trigger:
|
|
- platform: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
from: Langdurig Afwezig
|
|
to: Juist Aangekomen
|
|
- platform: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
from: Langdurig Afwezig
|
|
to: Juist Aangekomen
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.op_verlof'', ''on'') }}'
|
|
actions:
|
|
- action: notify.giel_en_martine
|
|
data_template:
|
|
message: Zijn jullie terug thuis van vakantie? Zet dan Vakantie-modus uit.
|
|
data:
|
|
actions:
|
|
- action: VERLOF_AAN
|
|
title: Vakantie-modus aan.
|
|
- action: VERLOF_UIT
|
|
title: Vakantie-modus uit.
|
|
- delay: 300
|
|
- alias: Kerstverlichting Aan/Uit
|
|
id: 8100710d-1003-447e-81f9-fba8541bb5dd
|
|
trigger:
|
|
- platform: time
|
|
at: 06:00:00
|
|
- platform: time
|
|
at: '23:02:00'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
weekday:
|
|
- mon
|
|
- tue
|
|
- wed
|
|
- thu
|
|
- fri
|
|
- sat
|
|
- sun
|
|
- condition: template
|
|
value_template: '{{ now().month == 12 or now().month == 1 }}'
|
|
actions:
|
|
- action: "{% if now().hour == 23 %}\n switch.turn_off\n{% else %}\n switch.turn_on\n\
|
|
{% endif %}\n"
|
|
entity_id: switch.ventilator_kerstverlichting
|
|
- alias: Keuken licht
|
|
id: c2162024-4f52-40f8-b703-150ff505bc2c
|
|
mode: restart
|
|
max_exceeded: silent
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_aqara_pir
|
|
from: 'off'
|
|
to: 'on'
|
|
id: presence
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_pir
|
|
from: 'off'
|
|
to: 'on'
|
|
id: presence
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_presence
|
|
from: 'off'
|
|
to: 'on'
|
|
id: presence
|
|
- platform: state
|
|
entity_id: light.keuken_inkom
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: light.keuken_luster
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: light.keuken_spots
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
from: 'off'
|
|
to: 'on'
|
|
actions:
|
|
- delay:
|
|
milliseconds: 200
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_bezetting
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'true'
|
|
- alias: geen ander licht in de keuken
|
|
condition: state
|
|
entity_id: light.keuken_spots
|
|
state: 'off'
|
|
sequence:
|
|
- action: light.turn_on
|
|
entity_id: light.keuken_luster
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(hours=2) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.keuken_end_time
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_bezetting
|
|
from: 'on'
|
|
to: 'off'
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.keuken_end_time
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_bezetting
|
|
state: 'on'
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(hours=2) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.keuken_end_time
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_bezetting
|
|
from: 'on'
|
|
to: 'off'
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.keuken_end_time
|
|
default:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.keuken_end_time
|
|
- alias: Kink distortion
|
|
id: 893a1783-31af-4dba-9b86-94731c222952
|
|
trigger:
|
|
- platform: time
|
|
at: '15:59:59'
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ state_attr("media_player.mass_keuken", "media_album_name")
|
|
!= "KINK DISTORTION" }}
|
|
|
|
'
|
|
- condition: time
|
|
weekday:
|
|
- mon
|
|
- tue
|
|
- wed
|
|
- thu
|
|
- fri
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_not_playing
|
|
state: 'off'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.philips_tv
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: person.giel
|
|
state: home
|
|
- condition: state
|
|
entity_id: person.martine
|
|
state: home
|
|
actions:
|
|
- action: media_player.play_media
|
|
data:
|
|
media_content_id: KINK DISTORTION
|
|
media_content_type: radio
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
- delay:
|
|
seconds: 3
|
|
- action: media_player.play_media
|
|
data:
|
|
media_content_id: KINK DISTORTION
|
|
media_content_type: radio
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
- alias: Knop Fien 2 klik
|
|
id: 9742a76c-726a-4f71-8eea-f61edcbf6812
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_fien_2_klik
|
|
to: 'on'
|
|
id: aan
|
|
- platform: time
|
|
at: input_datetime.slaapkamer_fien_verwarming_end_time
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.fien
|
|
data:
|
|
preset_mode: comfort
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=3600) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.slaapkamer_fien_verwarming_end_time
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.fien
|
|
data:
|
|
preset_mode: away
|
|
- alias: Knop Fien 3 klik
|
|
id: 15be0ec1-1733-4118-ba33-b729ee182926
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_fien_3_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.fien
|
|
data:
|
|
brightness: 70
|
|
- alias: Knop Fien 4 klik
|
|
id: b0876a7a-d4f7-4627-984c-1d1eeb9cbc0a
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_fien_4_klik
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: input_button.verwarming_1u_fien
|
|
to: 'on'
|
|
id: aan
|
|
- platform: time
|
|
at: input_datetime.slaapkamer_fien_verwarming_end_time
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.fien
|
|
data:
|
|
preset_mode: comfort
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=3600) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.slaapkamer_fien_verwarming_end_time
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.fien
|
|
data:
|
|
preset_mode: away
|
|
- alias: Knop Giel 5 klik
|
|
id: 0bce1b77-c946-4acb-aee3-c41d919b9e7d
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_giel_5_klik
|
|
to: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
brightness: 255
|
|
- action: light.turn_on
|
|
entity_id:
|
|
- light.alle_tuinverlichting
|
|
- light.danszaal_spots
|
|
- light.keuken_spots
|
|
- light.danszaal_luster
|
|
- light.keuken_luster
|
|
- light.zithoek_luster
|
|
- light.keuken_inkom
|
|
- delay:
|
|
minutes: 5
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.alle_tuinverlichting
|
|
- light.danszaal_spots
|
|
- light.keuken_spots
|
|
- light.spots_tv
|
|
- light.danszaal_luster
|
|
- light.keuken_luster
|
|
- light.zithoek_luster
|
|
- light.keuken_inkom
|
|
- alias: Knop Fien klik
|
|
id: a53e7d6b-3e8a-4b90-834b-29be302b84c9
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_fien_klik
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.fien") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.fien
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.fien
|
|
brightness: 255
|
|
rgb_color:
|
|
- 255
|
|
- 236
|
|
- 182
|
|
- alias: Knop sfeerlicht
|
|
id: 0d8ad9a0-1ef5-4ebe-a8c4-1739872a5690
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_sfeer
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.garage_sfeerverlichting") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.garage_sfeerverlichting
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.garage_sfeerverlichting
|
|
- alias: Knop sjotterbak
|
|
id: 4da0d527-a14e-4ede-a5d7-3877b62a1b70
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_sjotterbak
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.garage_sjotterbak") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.garage_sjotterbak
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.garage_sjotterbak
|
|
- alias: knop_vogelpik
|
|
id: e1ea94ff-f30a-4310-bac7-9c70ce63c8dd
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.knop_vogelpik
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.vogelpik") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.vogelpik
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.vogelpik
|
|
- alias: Koffiezet Uit tijd
|
|
id: b41e0a5b-d342-4117-9bab-ea98d025dda3
|
|
trigger:
|
|
- platform: time
|
|
at: '19:00'
|
|
- platform: time
|
|
at: '21:00'
|
|
condition:
|
|
- condition: time
|
|
weekday:
|
|
- mon
|
|
- tue
|
|
- wed
|
|
- thu
|
|
- fri
|
|
- sat
|
|
- sun
|
|
actions:
|
|
- action: switch.turn_off
|
|
entity_id:
|
|
- switch.koffiezet
|
|
- switch.stopcontacten_terras
|
|
- switch.pries_poort
|
|
- switch.stopcontacten_garage
|
|
- alias: Licht buiten_lowpass
|
|
id: 827c4b46-d0b8-460a-9436-747dee073906
|
|
mode: parallel
|
|
trigger:
|
|
- platform: template
|
|
value_template: '{{ states("sensor.huidige_opbrengst") | int(0) > 100 }}
|
|
|
|
'
|
|
for:
|
|
minutes: 5
|
|
id: binnen
|
|
- platform: template
|
|
value_template: '{{ states("sensor.huidige_opbrengst") | int(0) > 0 }}
|
|
|
|
'
|
|
for:
|
|
minutes: 5
|
|
id: buiten
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
above: 1350
|
|
for:
|
|
minutes: 5
|
|
id: binnen
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
above: 150
|
|
for:
|
|
minutes: 5
|
|
id: buiten
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: buiten
|
|
sequence:
|
|
- action: input_boolean.turn_off
|
|
entity_id:
|
|
- input_boolean.donker_buiten_lowpass
|
|
- conditions:
|
|
- condition: trigger
|
|
id: binnen
|
|
- condition: time
|
|
before: ' 17:00:00'
|
|
sequence:
|
|
- action: input_boolean.turn_off
|
|
entity_id:
|
|
- input_boolean.donker_binnen_lowpass
|
|
- alias: Licht hof fotocel error
|
|
id: 6bf93324-4d08-4291-b6e0-d35c8b88b9b8
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.fotocel_poort_error
|
|
to: 'on'
|
|
actions:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.alle_tuinverlichting
|
|
- alias: Mark person as just arrived
|
|
id: ac072b45-25fa-44af-b15e-62c1c57bb35b
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.giel_bayesian
|
|
from: 'off'
|
|
to: 'on'
|
|
id: giel
|
|
- platform: state
|
|
entity_id: binary_sensor.martine_bayesian
|
|
from: 'off'
|
|
to: 'on'
|
|
id: martine
|
|
- platform: state
|
|
entity_id: binary_sensor.noor_bayesian
|
|
from: 'off'
|
|
to: 'on'
|
|
id: noor
|
|
- platform: state
|
|
entity_id: binary_sensor.fien_bayesian
|
|
from: 'off'
|
|
to: 'on'
|
|
id: fien
|
|
- platform: state
|
|
entity_id: device_tracker.gphone_bermuda
|
|
to: home
|
|
id: giel
|
|
- platform: state
|
|
entity_id: device_tracker.mphone_bermuda
|
|
to: home
|
|
id: martine
|
|
- platform: state
|
|
entity_id: device_tracker.nphone_bermuda
|
|
to: home
|
|
id: noor
|
|
- platform: state
|
|
entity_id: device_tracker.fphone_bermuda
|
|
to: home
|
|
id: fien
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()) - as_timestamp(states("sensor.uptime")))
|
|
/ 3600 | float > 0.03 | float }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: "{% if trigger.id == 'giel' %}\n {{ states('input_select.giel_status_dropdown')\
|
|
\ is not in ['Thuis', \"Juist Aangekomen\"] }}\n{% elif trigger.id == 'martine'\
|
|
\ %}\n {{ states('input_select.martine_status_dropdown') is not in ['Thuis',\
|
|
\ \"Juist Aangekomen\"] }}\n{% elif trigger.id == 'noor' %}\n {{ states('input_select.noor_status_dropdown')\
|
|
\ is not in ['Thuis', \"Juist Aangekomen\"] }}\n{% elif trigger.id == 'fien'\
|
|
\ %}\n {{ states('input_select.fien_status_dropdown') is not in ['Thuis',\
|
|
\ \"Juist Aangekomen\"] }}\n{% endif %}\n"
|
|
actions:
|
|
- action: "{% if trigger.id == 'giel' %}\n script.request_gphone_update\n{% elif\
|
|
\ trigger.id == 'martine' %}\n script.request_mphone_update\n{% elif trigger.id\
|
|
\ == 'noor' %}\n script.request_nphone_update\n{% elif trigger.id == 'fien'\
|
|
\ %}\n script.request_fphone_update\n{% endif %}\n"
|
|
- action: input_select.select_option
|
|
data_template:
|
|
entity_id: "{% if trigger.id == 'giel' %}\n input_select.giel_status_dropdown\n\
|
|
{% elif trigger.id == 'martine' %}\n input_select.martine_status_dropdown\n\
|
|
{% elif trigger.id == 'noor' %}\n input_select.noor_status_dropdown\n{% elif\
|
|
\ trigger.id == 'fien' %}\n input_select.fien_status_dropdown\n{% endif %}\n"
|
|
option: Juist Aangekomen
|
|
- alias: Mark person as away
|
|
id: 4aad449c-e8a5-43e0-9d16-be8f3b5c846d
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.giel_status_dropdown
|
|
to: Juist Weg
|
|
for:
|
|
minutes: 5
|
|
- platform: state
|
|
entity_id: input_select.martine_status_dropdown
|
|
to: Juist Weg
|
|
for:
|
|
minutes: 5
|
|
- platform: state
|
|
entity_id: input_select.noor_status_dropdown
|
|
to: Juist Weg
|
|
for:
|
|
minutes: 5
|
|
- platform: state
|
|
entity_id: input_select.fien_status_dropdown
|
|
to: Juist Weg
|
|
for:
|
|
minutes: 5
|
|
actions:
|
|
- action: input_select.select_option
|
|
data_template:
|
|
entity_id: "{% if trigger.entity_id == 'input_select.giel_status_dropdown' %}\n\
|
|
\ input_select.giel_status_dropdown\n{% elif trigger.entity_id == 'input_select.martine_status_dropdown'\
|
|
\ %}\n input_select.martine_status_dropdown\n{% elif trigger.entity_id ==\
|
|
\ 'input_select.noor_status_dropdown' %}\n input_select.noor_status_dropdown\n\
|
|
{% else %}\n input_select.fien_status_dropdown\n{% endif %}\n"
|
|
option: Afwezig
|
|
- alias: Mark person as extended away
|
|
id: 10f5bbf2-11d1-4c72-a597-241255a479d4
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.giel_status_dropdown
|
|
to: Afwezig
|
|
for:
|
|
hours: 12
|
|
- platform: state
|
|
entity_id: input_select.martine_status_dropdown
|
|
to: Afwezig
|
|
for:
|
|
hours: 12
|
|
- platform: state
|
|
entity_id: input_select.noor_status_dropdown
|
|
to: Afwezig
|
|
for:
|
|
hours: 12
|
|
- platform: state
|
|
entity_id: input_select.fien_status_dropdown
|
|
to: Afwezig
|
|
for:
|
|
hours: 12
|
|
actions:
|
|
- action: input_select.select_option
|
|
data_template:
|
|
entity_id: "{% if trigger.entity_id == 'input_select.giel_status_dropdown' %}\n\
|
|
\ input_select.giel_status_dropdown\n{% elif trigger.entity_id == 'input_select.martine_status_dropdown'\
|
|
\ %}\n input_select.martine_status_dropdown\n{% elif trigger.entity_id ==\
|
|
\ 'input_select.noor_status_dropdown' %}\n input_select.noor_status_dropdown\n\
|
|
{% else %}\n input_select.fien_status_dropdown\n{% endif %}\n"
|
|
option: Langdurig Afwezig
|
|
- alias: Mark person as home
|
|
id: fa603b89-15d6-47b9-909c-1bd93e5768ae
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.giel_status_dropdown
|
|
to: Juist Aangekomen
|
|
for:
|
|
minutes: 5
|
|
- platform: state
|
|
entity_id: input_select.martine_status_dropdown
|
|
to: Juist Aangekomen
|
|
for:
|
|
minutes: 5
|
|
- platform: state
|
|
entity_id: input_select.noor_status_dropdown
|
|
to: Juist Aangekomen
|
|
for:
|
|
minutes: 5
|
|
- platform: state
|
|
entity_id: input_select.fien_status_dropdown
|
|
to: Juist Aangekomen
|
|
for:
|
|
minutes: 5
|
|
actions:
|
|
- action: input_select.select_option
|
|
data_template:
|
|
entity_id: "{% if trigger.entity_id == 'input_select.giel_status_dropdown' %}\n\
|
|
\ input_select.giel_status_dropdown\n{% elif trigger.entity_id == 'input_select.martine_status_dropdown'\
|
|
\ %}\n input_select.martine_status_dropdown\n{% elif trigger.entity_id ==\
|
|
\ 'input_select.noor_status_dropdown' %}\n input_select.noor_status_dropdown\n\
|
|
{% else %}\n input_select.fien_status_dropdown\n{% endif %}\n"
|
|
option: Thuis
|
|
- alias: Mark person as just left
|
|
id: 47e2d373-ee0f-4650-9338-996019fcee5b
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.giel_bayesian
|
|
id: giel
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
seconds: 15
|
|
- platform: state
|
|
entity_id: binary_sensor.martine_bayesian
|
|
id: martine
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
seconds: 15
|
|
- platform: state
|
|
entity_id: binary_sensor.noor_bayesian
|
|
id: noor
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
seconds: 15
|
|
- platform: state
|
|
entity_id: binary_sensor.fien_bayesian
|
|
id: fien
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
seconds: 15
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()) - as_timestamp(states("sensor.uptime")))
|
|
/ 3600 | float > 0.03 | float }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: "{% if trigger.id == 'giel' %}\n {{ is_state('binary_sensor.giel_thuis_nacht',\
|
|
\ 'off') }}\n{% elif trigger.id == 'martine' %}\n {{ is_state('binary_sensor.martine_thuis_nacht',\
|
|
\ 'off') }}\n{% elif trigger.id == 'noor' %}\n {{ is_state('binary_sensor.noor_thuis_nacht',\
|
|
\ 'off') }}\n{% elif trigger.id == 'fien' %}\n {{ is_state('binary_sensor.fien_thuis_nacht',\
|
|
\ 'off') }}\n{% endif %}\n"
|
|
actions:
|
|
- action: input_select.select_option
|
|
data_template:
|
|
entity_id: "{% if trigger.id == 'giel' %}\n input_select.giel_status_dropdown\n\
|
|
{% elif trigger.id == 'martine' %}\n input_select.martine_status_dropdown\n\
|
|
{% elif trigger.id == 'noor' %}\n input_select.noor_status_dropdown\n{% else\
|
|
\ %}\n input_select.fien_status_dropdown\n{% endif %}\n"
|
|
option: Juist Weg
|
|
- alias: Maximum maandpiek
|
|
id: 029f8e22-a953-4b4e-b0ba-1acdb414ee68
|
|
description: ''
|
|
mode: single
|
|
trigger:
|
|
- platform: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%d'', true) | int
|
|
== 1 }}'
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 2 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.january_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.january_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.february_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 3 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.february_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.february_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.march_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 4 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.march_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.march_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.april_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 5 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.april_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.april_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.may_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 6 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.may_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.may_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.june_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 7 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.june_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.june_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.july_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 8 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.july_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.july_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.august_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 9 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.august_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.august_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.september_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 10 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.september_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.september_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.october_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 11 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.october_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.october_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.november_peak
|
|
data:
|
|
value: 2500
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 12 }}'
|
|
sequence:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.november_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.november_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.december_peak
|
|
data:
|
|
value: 2500
|
|
default:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.december_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.december_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") }}
|
|
|
|
'
|
|
- delay:
|
|
seconds: 5
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: 100
|
|
- delay:
|
|
minutes: 1
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.january_peak
|
|
data:
|
|
value: 2500
|
|
- alias: Maximum maandpiek
|
|
id: fevefvdvfzsvf
|
|
description: ''
|
|
mode: single
|
|
trigger:
|
|
- platform: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%d'', true) | int
|
|
== 1 }}'
|
|
condition: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 2 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.january_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.january_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.february_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 3 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.february_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.february_peak_2\") | float(default=0) %}\n {{ states(\"\
|
|
sensor.max_peak_2\") }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.march_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 4 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.march_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.march_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.april_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 5 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.april_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.april_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.may_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 6 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.may_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.may_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.june_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 7 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.june_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.june_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.july_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 8 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.july_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.july_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.august_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 9 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.august_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.august_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.september_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 10 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.september_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.september_peak_2\") | float(default=0) %}\n {{ states(\"\
|
|
sensor.max_peak_2\") }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.october_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 11 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.october_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.october_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.november_peak_2
|
|
data:
|
|
value: 2.5
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()))|timestamp_custom(''%m'', true)|int
|
|
== 12 }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.november_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.november_peak_2\") | float(default=0) %}\n {{ states(\"\
|
|
sensor.max_peak_2\") }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.december_peak_2
|
|
data:
|
|
value: 2.5
|
|
default:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.december_peak_2
|
|
data:
|
|
value: "{% if states(\"sensor.max_peak_2\") | float(default=0)> states(\"\
|
|
input_number.december_peak_2\") | float(default=0) %}\n {{ states(\"sensor.max_peak_2\"\
|
|
) }}\n{% else %}\n 2.5\n{% endif %}\n"
|
|
- delay:
|
|
seconds: 5
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: 0.1
|
|
- delay:
|
|
minutes: 1
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.january_peak_2
|
|
data:
|
|
value: 2.5
|
|
- alias: Maximum piek
|
|
id: cfa1b69b-abe9-44de-9bbe-44c5be09ea9d
|
|
description: ''
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.max_peak
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak") | float(default=0)> states("input_number.max_peak")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
action:
|
|
- service: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak
|
|
data:
|
|
value: '{{ states("sensor.max_peak") | float(default=0)}}
|
|
|
|
'
|
|
- alias: Maximum piek 2
|
|
id: 546462125er
|
|
description: ''
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.max_peak_2
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_peak_2") | float(default=0)> states("input_number.max_peak_2")
|
|
| float(default=0)}}
|
|
|
|
'
|
|
actions:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.max_peak_2
|
|
data:
|
|
value: '{{ states("sensor.max_peak_2") | float(default=0)}}
|
|
|
|
'
|
|
- alias: Welkom allemaal, sonos paused
|
|
id: b070f06f-a9e1-4e05-94b2-8e6e7c2d1372
|
|
mode: single
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ (is_state('binary_sensor.gang_voordeur_last_5_min', 'on')\n\
|
|
\ or is_state('binary_sensor.keuken_achterdeur_last_5_min', 'on')) and\n\
|
|
\ (is_state('binary_sensor.keuken_aqara_pir', 'on') \n or is_state('binary_sensor.keuken_presence',\
|
|
\ 'on')\n or is_state('binary_sensor.keuken_pir', 'on')) }}\n"
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_achterdeur_last_5_min
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.gang_voordeur_last_5_min
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_not_playing
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.people_arrive_count
|
|
above: 1
|
|
- condition: template
|
|
value_template: "{{ as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_sonos_playing',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_allemaal_sonos_paused',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_allemaal_sonos_playing',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_sonos_paused',\
|
|
\ 'last_triggered')) | float > 310 }}\n"
|
|
actions:
|
|
- action: media_player.play_media
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
data:
|
|
announce: true
|
|
media_content_type: music
|
|
extra:
|
|
volume: 60
|
|
media_content_id: "{% set message = states('sensor.welkom_2') %}\n media-source://tts/tts.home_assistant_cloud?message=\"\
|
|
{{message}}\"\n"
|
|
- delay:
|
|
seconds: 5
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.philips_tv
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: time
|
|
after: '15:55:00'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
- action: media_player.join
|
|
data:
|
|
group_members:
|
|
- media_player.mass_living_2
|
|
- media_player.mass_2c
|
|
- media_player.mass_move
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
- delay:
|
|
seconds: 5
|
|
- action: media_player.volume_set
|
|
data:
|
|
volume_level: 0.14
|
|
target:
|
|
entity_id:
|
|
- media_player.mass_keuken
|
|
- media_player.mass_2c
|
|
- media_player.mass_living_2
|
|
- media_player.mass_move
|
|
- delay:
|
|
seconds: 5
|
|
- action: media_player.media_play
|
|
data_template:
|
|
entity_id: media_player.mass_keuken
|
|
- alias: Welkom allemaal, sonos playing
|
|
id: 943b0e04-920d-4874-a5a2-27798ac7c36a
|
|
mode: single
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ (is_state('binary_sensor.gang_voordeur_last_5_min', 'on')\n\
|
|
\ or is_state('binary_sensor.keuken_achterdeur_last_5_min', 'on')) and\n\
|
|
\ (is_state('binary_sensor.keuken_aqara_pir', 'on') \n or is_state('binary_sensor.keuken_presence',\
|
|
\ 'on')\n or is_state('binary_sensor.keuken_pir', 'on')) }}\n"
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_achterdeur_last_5_min
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.gang_voordeur_last_5_min
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: media_player.mass_keuken
|
|
state: playing
|
|
- condition: numeric_state
|
|
entity_id: sensor.people_arrive_count
|
|
above: 1
|
|
- condition: template
|
|
value_template: "{{ as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_sonos_playing',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_allemaal_sonos_paused',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_allemaal_sonos_playing',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_sonos_paused',\
|
|
\ 'last_triggered')) | float > 310 }}\n"
|
|
actions:
|
|
- action: media_player.play_media
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
data:
|
|
announce: true
|
|
media_content_type: music
|
|
extra:
|
|
volume: 60
|
|
media_content_id: "{% set message = states('sensor.welkom_2') %}\n media-source://tts/tts.home_assistant_cloud?message=\"\
|
|
{{message}}\"\n"
|
|
- alias: beveiliging verwarming noor
|
|
id: 430dfacf-b512-4d9f-93eb-8311fdc81035
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /5
|
|
seconds: 0
|
|
condition:
|
|
condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.noor
|
|
state: 'on'
|
|
action:
|
|
- service: switch.turn_off
|
|
entity_id: switch.noor
|
|
- id: noor_block
|
|
alias: Noor block
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.noor_blocker
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/noor.txt
|
|
name: Noor
|
|
- id: noor_allow
|
|
alias: Noor allow
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.noor_blocker
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/noor.txt
|
|
- id: noor_block_all
|
|
alias: Noor block all
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.noor_blocker_all
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
name: Noor all
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/no_internet_noor.txt
|
|
- id: noor_allow_all
|
|
alias: Noor allow all
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.noor_blocker_all
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/no_internet_noor.txt
|
|
- id: noor_block_snapchat
|
|
alias: Noor block snapchat
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.noor_snapchat_blocker
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
name: Noor snapchat
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/noor_snapchat.txt
|
|
- id: noor_allow_snapchat
|
|
alias: Noor allow snapchat
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.noor_snapchat_blocker
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/My-Hassio-config/master/documentation/adguard
|
|
filters/block/noor_snapchat.txt
|
|
- alias: Uit na aanwezigheid
|
|
id: 862d6268-71cb-472b-b6fd-dcebe484af14
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.zithoek_bezetting
|
|
to: 'off'
|
|
for:
|
|
minutes: 3
|
|
- platform: state
|
|
entity_id: binary_sensor.danszaal_bezetting
|
|
to: 'off'
|
|
for:
|
|
minutes: 3
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_bezetting
|
|
to: 'off'
|
|
for:
|
|
minutes: 2
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_fien_bezetting
|
|
to: 'off'
|
|
for:
|
|
minutes: 2
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_bezetting
|
|
to: 'off'
|
|
for:
|
|
minutes: 5
|
|
actions:
|
|
- action: light.turn_off
|
|
data_template:
|
|
entity_id: "{% if trigger.entity_id == 'binary_sensor.zithoek_bezetting' %}\n\
|
|
\ light.zithoek_luster\n{% elif trigger.entity_id == 'binary_sensor.danszaal_bezetting'\
|
|
\ %}\n light.danszaal_luster, light.danszaal_spots\n{% elif trigger.entity_id\
|
|
\ == 'binary_sensor.slaapkamer_fien_bezetting' %}\n light.fien\n{% elif trigger.entity_id\
|
|
\ == 'binary_sensor.garage_bezetting' %}\n light.garage, light.garage_werkbank,\
|
|
\ light.vogelpik, light.garage_sjotterbak, light.garage_sfeerverlichting\n\
|
|
{% else %}\n light.slaapkamer_hoog, light.slaapkamer_spot\n{% endif %}\n"
|
|
- alias: Welkom, sonos paused
|
|
id: a2617079-d1a8-4289-abeb-f094121eda24
|
|
mode: single
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ (is_state('binary_sensor.gang_voordeur_last_5_min', 'on')\n\
|
|
\ or is_state('binary_sensor.keuken_achterdeur_last_5_min', 'on')) and\n\
|
|
\ (is_state('binary_sensor.keuken_aqara_pir', 'on') \n or is_state('binary_sensor.keuken_presence',\
|
|
\ 'on')\n or is_state('binary_sensor.keuken_pir', 'on')) }}\n"
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_achterdeur_last_5_min
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.gang_voordeur_last_5_min
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_not_playing
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sensor.people_arrive_count
|
|
state: '1'
|
|
- condition: template
|
|
value_template: "{{ as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_sonos_playing',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_allemaal_sonos_paused',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_allemaal_sonos_playing',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_sonos_paused',\
|
|
\ 'last_triggered')) | float > 310 }}\n"
|
|
actions:
|
|
- action: media_player.play_media
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
data:
|
|
announce: true
|
|
media_content_type: music
|
|
extra:
|
|
volume: 60
|
|
media_content_id: "{% set message = states('sensor.welkom_1') %}\n media-source://tts/tts.home_assistant_cloud?message=\"\
|
|
{{message}}\"\n"
|
|
- delay:
|
|
seconds: 5
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.philips_tv
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: time
|
|
after: '15:55:00'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
- action: media_player.join
|
|
data:
|
|
group_members:
|
|
- media_player.mass_living_2
|
|
- media_player.mass_2c
|
|
- media_player.mass_move
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
- delay:
|
|
seconds: 5
|
|
- action: media_player.volume_set
|
|
data:
|
|
volume_level: 0.14
|
|
target:
|
|
entity_id:
|
|
- media_player.mass_keuken
|
|
- media_player.mass_2c
|
|
- media_player.mass_living_2
|
|
- media_player.mass_move
|
|
- delay:
|
|
seconds: 5
|
|
- action: script.random_music
|
|
data:
|
|
sonos_entity: media_player.mass_keuken
|
|
- alias: Welkom, sonos playing
|
|
id: e842f573-e463-40b3-af63-305d1be0e346
|
|
mode: single
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ (is_state('binary_sensor.gang_voordeur_last_5_min', 'on')\n\
|
|
\ or is_state('binary_sensor.keuken_achterdeur_last_5_min', 'on')) and\n\
|
|
\ (is_state('binary_sensor.keuken_aqara_pir', 'on') \n or is_state('binary_sensor.keuken_presence',\
|
|
\ 'on')\n or is_state('binary_sensor.keuken_pir', 'on')) }}\n"
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_achterdeur_last_5_min
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.gang_voordeur_last_5_min
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: media_player.mass_keuken
|
|
state: playing
|
|
- condition: state
|
|
entity_id: sensor.people_arrive_count
|
|
state: '1'
|
|
- condition: template
|
|
value_template: "{{ as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_sonos_playing',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_allemaal_sonos_paused',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_allemaal_sonos_playing',\
|
|
\ 'last_triggered')) | float > 310 and\n as_timestamp(now()) - as_timestamp(state_attr('automation.welkom_sonos_paused',\
|
|
\ 'last_triggered')) | float > 310 }}\n"
|
|
actions:
|
|
- action: media_player.play_media
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
data:
|
|
announce: true
|
|
media_content_type: music
|
|
extra:
|
|
volume: 60
|
|
media_content_id: "{% set message = states('sensor.welkom_1') %}\n media-source://tts/tts.home_assistant_cloud?message=\"\
|
|
{{message}}\"\n"
|
|
- alias: Oplader electrische fiets aan/uit
|
|
id: c8dc7693-df59-44e3-8a60-b6d7160c5c3f
|
|
trigger:
|
|
- platform: time
|
|
at: '14:02:00'
|
|
- platform: state
|
|
entity_id: input_select.noor_status_dropdown
|
|
to: Juist Aangekomen
|
|
for:
|
|
minutes: 2
|
|
id: noor_status
|
|
- platform: state
|
|
entity_id: input_select.fien_status_dropdown
|
|
to: Juist Aangekomen
|
|
for:
|
|
minutes: 2
|
|
id: fien_status
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
id: armed_night
|
|
to: armed_night
|
|
for:
|
|
minutes: 210
|
|
- platform: numeric_state
|
|
entity_id: sensor.garage_oplader_vermogen
|
|
id: garage_oplader
|
|
above: 1
|
|
below: 10
|
|
for:
|
|
minutes: 60
|
|
- platform: numeric_state
|
|
entity_id: sensor.pries_boven_vermogen
|
|
id: pries_boven
|
|
above: 1
|
|
below: 10
|
|
for:
|
|
minutes: 60
|
|
- platform: numeric_state
|
|
entity_id: sensor.pries_onder_vermogen
|
|
id: pries_onder
|
|
above: 1
|
|
below: 10
|
|
for:
|
|
minutes: 60
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
weekday:
|
|
- mon
|
|
- tue
|
|
- wed
|
|
- thu
|
|
- fri
|
|
- sat
|
|
- sun
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: noor_status
|
|
sequence:
|
|
- service: switch.turn_on
|
|
target:
|
|
entity_id: switch.pries_boven, switch.pries_onder
|
|
- conditions:
|
|
- condition: trigger
|
|
id: fien_status
|
|
sequence:
|
|
- service: switch.turn_on
|
|
target:
|
|
entity_id: switch.pries_boven, switch.pries_onder
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ now().hour == 14 }}
|
|
|
|
'
|
|
sequence:
|
|
- service: switch.turn_on
|
|
target:
|
|
entity_id: switch.garage_oplader, switch.pries_boven, switch.pries_onder
|
|
- conditions:
|
|
- condition: trigger
|
|
id: garage_oplader
|
|
sequence:
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.garage_oplader
|
|
- conditions:
|
|
- condition: trigger
|
|
id: pries_boven
|
|
sequence:
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.pries_boven
|
|
- conditions:
|
|
- condition: trigger
|
|
id: pries_onder
|
|
sequence:
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.pries_onder
|
|
- conditions:
|
|
- condition: trigger
|
|
id: armed_night
|
|
sequence:
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.garage_oplader, switch.pries_boven, switch.pries_onder
|
|
- alias: Op verlof - automations
|
|
id: eb2a783e-d902-4fca-804a-9289e40cc729
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.op_verlof
|
|
actions:
|
|
- action: "{% if states('input_boolean.op_verlof') == 'on' %}\n automation.turn_off\n\
|
|
{% else %}\n automation.turn_on\n{% endif %}\n"
|
|
entity_id: automation.kerstverlichting_aan_uit, automation.oplader_electrische_fiets_aan_uit,
|
|
automation.verluchting_afkoeling, automation.achterdeur_sluiten_warm_buiten
|
|
- alias: Op verlof - verwarming
|
|
id: 175fe341-f1a1-4a3a-b86f-4c28f57e3e80
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.op_verlof
|
|
actions:
|
|
- action: climate.set_preset_mode
|
|
entity_id: climate.living
|
|
data_template:
|
|
preset_mode: "{% if trigger.to_state.state == 'on' %}\n away\n{% else %}\n\
|
|
\ schedule\n{% endif %}\n"
|
|
- action: climate.set_hvac_mode
|
|
entity_id:
|
|
- climate.fien
|
|
- climate.badkamer
|
|
- climate.noor
|
|
- climate.slaapkamer
|
|
- climate.garage
|
|
data_template:
|
|
hvac_mode: "{% if trigger.to_state.state == 'on' %}\n off\n{% else %}\n heat\n\
|
|
{% endif %}\n"
|
|
- alias: Stofzuiger pause/locate
|
|
id: 85099f39-8613-4f06-a709-6aa69841b719
|
|
description: ''
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.keuken_bezetting
|
|
to: 'on'
|
|
id: keuken
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.living_bezetting
|
|
to: 'on'
|
|
id: living
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.wc_aqara_pir
|
|
to: 'on'
|
|
id: wc
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.waskot_aqara_pir
|
|
to: 'on'
|
|
id: waskot
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.gang_beneden_pir
|
|
to: 'on'
|
|
id: gang
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{as_timestamp(now()) - as_timestamp(state_attr(''script.bitch_prullenbak'',
|
|
''last_triggered'')) | float > 90 }}'
|
|
- condition: template
|
|
value_template: "{% set person = [\n states.person.giel,\n states.person.martine,\n\
|
|
\ states.person.noor,\n states.person.fien\n ] %}\n{{ person | selectattr('state','eq','home')\
|
|
\ | list | count > 0 }}\n"
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: docked
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: returning
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: cleaning
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: error
|
|
actions:
|
|
- action: vacuum.locate
|
|
target:
|
|
entity_id: vacuum.claptrap
|
|
- alias: People home badge
|
|
id: 58ffbfbe-21b0-417d-a6fc-fa051379a5df
|
|
mode: queued
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.people_home
|
|
actions:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: delete_alert
|
|
data:
|
|
push:
|
|
badge: '{{ states("sensor.people_home") }}
|
|
|
|
'
|
|
- alias: Pomp vloerverwarming
|
|
id: 19651013-1164-44e7-a2b9-361ab2c437e4
|
|
description: De pomp moet draaien wanneer de warmtepomp draait en 20 min nadraaien
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.warmtepomp_aan
|
|
to: 'on'
|
|
- platform: template
|
|
value_template: '{{ states("sensor.vloerverwarming_terug") | float(0) < state_attr("climate.living",
|
|
"current_temperature") | float(0) }}
|
|
|
|
'
|
|
for:
|
|
minutes: 5
|
|
condition: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.warmtepomp_aan
|
|
state: 'off'
|
|
sequence:
|
|
- action: switch.turn_off
|
|
entity_id:
|
|
- switch.vloerverwarming
|
|
default:
|
|
- action: switch.turn_on
|
|
entity_id: switch.vloerverwarming
|
|
mode: single
|
|
- alias: poort action
|
|
id: 33235461-2f5e-4189-8e3c-1c13df040758
|
|
trigger:
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: POORT
|
|
actions:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.incognito
|
|
- alias: Prediction set input_number
|
|
id: b81cb250-5e2b-46e0-984b-f09c1a4eec92
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.voorspelde_uren
|
|
id: prediction
|
|
- platform: state
|
|
entity_id: sensor.voorspelde_uren_adaboost
|
|
id: prediction_adaboost
|
|
- platform: state
|
|
entity_id: sensor.voorspelde_uren_gradientboosting
|
|
id: prediction_gradientboosting
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: prediction
|
|
- condition: template
|
|
value_template: '{{ has_value("sensor.voorspelde_uren") }}
|
|
|
|
'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
data:
|
|
value: "{% if states(\"sensor.voorspelde_uren\") | float | round(2) >= 0\
|
|
\ -%}\n {{ states(\"sensor.voorspelde_uren\") | float | round(2) }}\n\
|
|
{% else -%}\n 0\n{% endif -%}\n"
|
|
target:
|
|
entity_id: input_number.voorspelde_uren
|
|
- conditions:
|
|
- condition: trigger
|
|
id: prediction_adaboost
|
|
- condition: template
|
|
value_template: '{{ has_value("sensor.voorspelde_uren_adaboost") }}
|
|
|
|
'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
data:
|
|
value: "{% if states(\"sensor.voorspelde_uren_adaboost\") | float | round(2)\
|
|
\ >= 0 -%}\n {{ states(\"sensor.voorspelde_uren_adaboost\") | float |\
|
|
\ round(2) }}\n{% else -%}\n 0\n{% endif -%}\n"
|
|
target:
|
|
entity_id: input_number.voorspelde_uren_adaboost
|
|
- conditions:
|
|
- condition: trigger
|
|
id: prediction_gradientboosting
|
|
- condition: template
|
|
value_template: '{{ has_value("sensor.voorspelde_uren_gradientboosting") }}
|
|
|
|
'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
data:
|
|
value: "{% if states(\"sensor.voorspelde_uren_gradientboosting\") | float\
|
|
\ | round(2) >= 0 -%}\n {{ states(\"sensor.voorspelde_uren_gradientboosting\"\
|
|
) | float | round(2) }}\n{% else -%}\n 0\n{% endif -%}\n"
|
|
target:
|
|
entity_id: input_number.voorspelde_uren_gradientboosting
|
|
- alias: Purge database
|
|
id: ca43a372-7850-436b-94e5-5024377653be
|
|
trigger:
|
|
- platform: time
|
|
at: 03:12:00
|
|
- platform: time
|
|
at: 04:12:00
|
|
variables:
|
|
batch_size: 50
|
|
all_entities: '{{ states | map(attribute=''entity_id'') | list }}
|
|
|
|
'
|
|
power_entities: '{{ state_attr(''group.power_entities'', ''entity_id'') | list
|
|
}}
|
|
|
|
'
|
|
not_recorded: "{{ state_attr(\"group.not_recorded_entities\", \"entity_id\") |\
|
|
\ list +\n state_attr(\"sensor.not_recorded_entites\", \"list\") | list }}\n"
|
|
purge_entities: '{{ all_entities | reject(''in'', power_entities) | list | reject(''in'',
|
|
not_recorded) | list }}
|
|
|
|
'
|
|
purge_batches: "{% set batches = namespace(data=[]) %} {% for i in range(0, (purge_entities\
|
|
\ | length // batch_size) + 1) %}\n {% set start = i * batch_size %}\n {%\
|
|
\ set end = start + batch_size %}\n {% set slice = purge_entities[start:end]\
|
|
\ %}\n {% if slice %}\n {% set batches.data = batches.data + [slice] %}\n\
|
|
\ {% endif %}\n{% endfor %} {{ batches.data }}\n"
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ now().hour == 3 }}'
|
|
sequence:
|
|
- repeat:
|
|
count: '{{ purge_batches | length }}'
|
|
sequence:
|
|
- service: recorder.purge_entities
|
|
data:
|
|
keep_days: 7
|
|
target:
|
|
entity_id: '{{ purge_batches[repeat.index - 1] }}'
|
|
- delay:
|
|
seconds: 30
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ now().hour == 4 }}'
|
|
sequence:
|
|
- service: recorder.purge
|
|
data:
|
|
repack: true
|
|
keep_days: 365
|
|
mode: single
|
|
- alias: Puschbutton leds sync
|
|
id: 2624a6a7-b817-41f3-bb22-904957508255
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: light.wc
|
|
- platform: state
|
|
entity_id: light.waskot
|
|
- platform: state
|
|
entity_id: light.badkamer_hoog
|
|
- platform: state
|
|
entity_id: light.kelder
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ as_timestamp(now()) - as_timestamp(states("sensor.uptime"))
|
|
> 30 }}
|
|
|
|
'
|
|
actions:
|
|
- action: "{% if trigger.to_state.state == 'on' %}\n switch.turn_on\n{% else %}\n\
|
|
\ switch.turn_off\n{% endif %}\n"
|
|
data_template:
|
|
entity_id: "{% if trigger.entity_id == 'light.wc' %}\n switch.led_wc\n{% elif\
|
|
\ trigger.entity_id == 'light.waskot' %}\n switch.led_waskot\n{% elif trigger.entity_id\
|
|
\ == 'light.kelder' %}\n switch.led_kelder\n{% else %}\n switch.led_badkamer\n\
|
|
{% endif %}\n"
|
|
- alias: RAFC_lichten_aan
|
|
id: 881fc702-28a1-4616-8fe4-7490e60db9ed
|
|
trigger:
|
|
- entity_id: calendar.rafc
|
|
platform: state
|
|
to: 'on'
|
|
condition: []
|
|
actions:
|
|
- action: light.turn_on
|
|
data:
|
|
rgb_color:
|
|
- 206
|
|
- 21
|
|
- 55
|
|
brightness: 255
|
|
entity_id: light.spots_tv
|
|
- action: script.turn_on
|
|
data:
|
|
entity_id: script.rafc2_1
|
|
- alias: RAFC_lichten_uit
|
|
id: 143a2976-c385-4039-bcfb-e9779b484e9f
|
|
trigger:
|
|
- entity_id: calendar.rafc
|
|
platform: state
|
|
to: 'off'
|
|
for:
|
|
minutes: 20
|
|
actions:
|
|
- action: homeassistant.turn_off
|
|
entity_id:
|
|
- script.rafc2_1
|
|
- script.rafc2_2
|
|
- action: "{% if is_state('sensor.dark_inside', 'true') %}\n light.turn_on\n{%\
|
|
\ elif is_state('sensor.dark_inside', 'false') %}\n light.turn_off\n{% endif\
|
|
\ %}"
|
|
target:
|
|
entity_id:
|
|
- light.spots_tv
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''sensor.dark_inside'', ''true'') }} '
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
profile: reading
|
|
- alias: Ramen openen/sluiten
|
|
id: 10a371eb-8dfd-44c3-90cd-46519ae531de
|
|
mode: restart
|
|
trigger:
|
|
- platform: template
|
|
id: open
|
|
value_template: '{{ states(''sensor.gemiddelde_temp_beneden'') | float(default=0)
|
|
> (states(''sensor.buiten_temperatuur'') | float(default=0) - 1 ) }}
|
|
|
|
'
|
|
for:
|
|
minutes: 5
|
|
- platform: template
|
|
id: close
|
|
value_template: '{{ (states(''sensor.gemiddelde_temp_beneden'') | float(default=0)
|
|
< (states(''sensor.buiten_temperatuur'') | float(default=0)) ) }}
|
|
|
|
'
|
|
for:
|
|
minutes: 5
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.buiten_temperatuur") != "unknown" and states("sensor.buiten_temperatuur")
|
|
!= "unavailable" }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_temperatuur_buiten_voorspelling_12u")
|
|
|float > 22 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()) - as_timestamp(states.automation.ramen_openen_sluiten.attributes.last_triggered)
|
|
| int) > 600 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ as_timestamp(now()) - as_timestamp(states("sensor.uptime"))
|
|
> 900 }}
|
|
|
|
'
|
|
actions:
|
|
- wait_template: '{{ states(''sensor.people_home'')|int(0) > 0 }}
|
|
|
|
'
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: open
|
|
sequence:
|
|
- action: script.notify_everyone_at_home
|
|
data:
|
|
title: Verluchten kan.
|
|
message: 'Nu kunde alles openzetten, binnen is het {{ states(''sensor.gemiddelde_temp_beneden'')
|
|
}}°C en buiten {{ states(''sensor.buiten_temperatuur'') }}°C.
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: close
|
|
sequence:
|
|
- action: script.notify_everyone_at_home
|
|
data:
|
|
title: Gelieve de warmte buiten te houden.
|
|
message: 'Het wordt hogen tijd da ge alles dicht doe, binnen is het {{ states(''sensor.gemiddelde_temp_beneden'')
|
|
}}°C en buiten {{ states(''sensor.buiten_temperatuur'') }}°C.
|
|
|
|
'
|
|
- alias: Reload integrations
|
|
description: Herladen van integraties bij unkown of unavailable.
|
|
id: 57abe3da-cb31-43f9-bea8-a3d73f4d3b5c
|
|
mode: parallel
|
|
trigger:
|
|
- platform: template
|
|
value_template: '{{ states("climate.living") is in ["unavailable", "unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: netatmo
|
|
- platform: template
|
|
value_template: '{{ states("sensor.huawei_active_power") is in ["unavailable",
|
|
"unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: huawei
|
|
- platform: template
|
|
value_template: '{{ states("sensor.energy_production_today") is in ["unavailable",
|
|
"unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: open_meteo
|
|
- platform: template
|
|
value_template: '{{ states("sensor.energy_production_tomorrow") is in ["unavailable",
|
|
"unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: open_meteo
|
|
- platform: template
|
|
value_template: '{{ states("sensor.energy_production_today_2") is in ["unavailable",
|
|
"unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: open_meteo_2
|
|
- platform: template
|
|
value_template: '{{ states("sensor.energy_production_tomorrow_2") is in ["unavailable",
|
|
"unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: open_meteo_2
|
|
- platform: template
|
|
value_template: '{{ states("sensor.energy_production_today_3") is in ["unavailable",
|
|
"unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: open_meteo_3
|
|
- platform: template
|
|
value_template: '{{ states("sensor.energy_production_tomorrow_3") is in ["unavailable",
|
|
"unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: open_meteo_3
|
|
- platform: template
|
|
value_template: '{{ states("sensor.solaredge_inverter_watts") is in ["unavailable",
|
|
"unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: solaredge
|
|
- platform: template
|
|
value_template: '{{ states("vacuum.claptrap") is in ["unavailable", "unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: claptrap
|
|
- platform: template
|
|
value_template: '{{ states("camera.tuin") is in ["unavailable", "unknown"]}}
|
|
|
|
'
|
|
for:
|
|
minutes: 2
|
|
id: camera_tuin
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: huawei
|
|
sequence:
|
|
- action: homeassistant.reload_config_entry
|
|
target:
|
|
entity_id: sensor.huawei_active_power
|
|
data:
|
|
entry_id: '{{ config_entry_id(''sensor.huawei_active_power'') }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: open_meteo
|
|
sequence:
|
|
- action: homeassistant.reload_config_entry
|
|
target:
|
|
entity_id: sensor.power_production_now
|
|
data:
|
|
entry_id: '{{ config_entry_id(''sensor.power_production_now'') }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: open_meteo_2
|
|
sequence:
|
|
- action: homeassistant.reload_config_entry
|
|
target:
|
|
entity_id: sensor.power_production_now_2
|
|
data:
|
|
entry_id: '{{ config_entry_id(''sensor.power_production_now_2'') }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: netatmo
|
|
sequence:
|
|
- action: homeassistant.reload_config_entry
|
|
target:
|
|
entity_id: climate.living
|
|
data:
|
|
entry_id: '{{ config_entry_id(''climate.living'') }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: open_meteo_3
|
|
sequence:
|
|
- action: homeassistant.reload_config_entry
|
|
target:
|
|
entity_id: sensor.power_production_now_3
|
|
data:
|
|
entry_id: '{{ config_entry_id(''sensor.power_production_now_3'') }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: solaredge
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: SolarEdge problemen!
|
|
- action: button.press
|
|
target:
|
|
entity_id: button.usw_lite_8_restart
|
|
- delay:
|
|
minutes: 5
|
|
- action: homeassistant.reload_config_entry
|
|
target:
|
|
entity_id: sensor.solaredge_i1_ac_power
|
|
data:
|
|
entry_id: '{{ config_entry_id(''sensor.solaredge_i1_ac_power'') }}
|
|
|
|
'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: claptrap
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: Claptrap reload
|
|
- action: unifi.reconnect_client
|
|
data:
|
|
device_id: 898240675928a9586b500febb0f72316
|
|
- delay:
|
|
minutes: 2
|
|
- action: homeassistant.reload_config_entry
|
|
data:
|
|
entry_id: '{{ config_entry_id(''vacuum.claptrap'') }}
|
|
|
|
'
|
|
target:
|
|
entity_id: vacuum.claptrap
|
|
- conditions:
|
|
- condition: trigger
|
|
id: camera_tuin
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: Camera tuin reload
|
|
- action: button.press
|
|
target:
|
|
entity_id: button.usw_lite_8_dahua_power_cycle
|
|
- id: enable_roblox
|
|
alias: Enable roblox
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowroblox
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-roblox.txt
|
|
- id: disable_roblox
|
|
alias: Disable roblox
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowroblox
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-roblox.txt
|
|
name: Roblox
|
|
- alias: Rookmelder alarm
|
|
id: 2e8185f1-1dda-4a1d-96af-06e61fa7dfb3
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.gang_rookmelder
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.living_rookmelder
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.waskot_rookmelder
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.kelder_rookmelder
|
|
to: 'on'
|
|
actions:
|
|
- action: notify.iedereen
|
|
data_template:
|
|
title: Alarm Home-Assistant.
|
|
message: "{% if is_state(\"binary_sensor.gang_rookmelder\", \"on\") -%}\n Rook\
|
|
\ gedetecteerd in de gang.\n{% elif is_state(\"binary_sensor.living_rookmelder\"\
|
|
, \"on\") -%}\n Rook gedetecteerd in de living.\n{% elif is_state(\"binary_sensor.waskot_rookmelder\"\
|
|
, \"on\") -%}\n Rook gedetecteerd in het waskot.\n{% elif is_state(\"binary_sensor.kelder_rookmelder\"\
|
|
, \"on\") -%}\n Rook gedetecteerd in de kelder.\n{% endif %}\n"
|
|
data:
|
|
push:
|
|
sound:
|
|
name: default
|
|
volume: 1.0
|
|
- action: script.turn_on
|
|
entity_id:
|
|
- script.alarm_lights1
|
|
- script.alarm_sound
|
|
- alias: Schuifke
|
|
id: f5b872a7-e61d-4a78-ae81-30ab1817511a
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.bthome_sensor_969c_window
|
|
to: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sensor.gphone_area
|
|
state: Garage
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
title: Wie zit er aan het schuifke?
|
|
message: "{% set verdachten = [\"sensor.mphone_area\", \"sensor.fphone_area\"\
|
|
, \"sensor.nphone_area\"] %} {% set schuldige = namespace(all=[]) %} {%\
|
|
\ for verdachte in verdachten %}\n {% if states(verdachte) == \"Garage\"\
|
|
\ %}\n {% set schuldige.all = schuldige.all + [state_attr(verdachte,\
|
|
\ 'friendly_name').split(\" \")[0]] %}\n {% endif %}\n{% endfor %} De\
|
|
\ verdachten zijn: {{ schuldige.all| join(\" of \") }}.\n"
|
|
- alias: Set device tracker
|
|
id: fa8245b7-3a4e-44f2-91d0-84a86ff5d978
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.giel_status
|
|
- platform: state
|
|
entity_id: sensor.martine_status
|
|
- platform: state
|
|
entity_id: sensor.noor_status
|
|
- platform: state
|
|
entity_id: sensor.fien_status
|
|
actions:
|
|
- action: device_tracker.see
|
|
data_template:
|
|
dev_id: "{% if trigger.entity_id == 'sensor.giel_status' %}\n giel_not_so_binary\n\
|
|
{% elif trigger.entity_id == 'sensor.martine_status' %}\n martine_not_so_binary\n\
|
|
{% elif trigger.entity_id == 'sensor.noor_status' %}\n noor_not_so_binary\n\
|
|
{% else %}\n fien_not_so_binary\n{% endif %}"
|
|
location_name: "{% if trigger.entity_id == 'sensor.giel_status' %}\n {{states('sensor.giel_status')}}\n\
|
|
{% elif trigger.entity_id == 'sensor.martine_status' %}\n {{states('sensor.martine_status')}}\n\
|
|
{% elif trigger.entity_id == 'sensor.noor_status' %}\n {{states('sensor.noor_status')}}\n\
|
|
{% else %}\n {{states('sensor.fien_status')}}\n{% endif %}"
|
|
source_type: router
|
|
- alias: Set device tracker after restart
|
|
id: 0fc12bf6-5c1b-4da3-a5e5-0516efc2f616
|
|
mode: parallel
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
actions:
|
|
- delay:
|
|
seconds: 15
|
|
- action: device_tracker.see
|
|
data_template:
|
|
dev_id: giel_not_so_binary
|
|
source_type: router
|
|
location_name: '{{states(''sensor.giel_status'')}}'
|
|
- action: device_tracker.see
|
|
data_template:
|
|
dev_id: martine_not_so_binary
|
|
source_type: router
|
|
location_name: '{{states(''sensor.martine_status'')}}'
|
|
- action: device_tracker.see
|
|
data_template:
|
|
dev_id: noor_not_so_binary
|
|
source_type: router
|
|
location_name: '{{states(''sensor.noor_status'')}}'
|
|
- action: device_tracker.see
|
|
data_template:
|
|
dev_id: fien_not_so_binary
|
|
source_type: router
|
|
location_name: '{{states(''sensor.fien_status'')}}'
|
|
- alias: Shuffle off
|
|
id: eb3f7fb4-1b87-457f-b0ce-da040bb7a3e4
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_not_playing
|
|
to: 'on'
|
|
actions:
|
|
- action: media_player.shuffle_set
|
|
data:
|
|
shuffle: false
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
- condition: state
|
|
entity_id: binary_sensor.badkamer_grouped_not_master
|
|
state: 'on'
|
|
- action: media_player.unjoin
|
|
target:
|
|
entity_id: media_player.mass_badkamer
|
|
- action: media_player.volume_set
|
|
data:
|
|
volume_level: 0.14
|
|
target:
|
|
entity_id:
|
|
- media_player.mass_badkamer
|
|
- alias: beveiliging verwarming slaapkamer
|
|
id: fe68544f-dca9-4560-9871-91818b485703
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /5
|
|
seconds: 0
|
|
condition:
|
|
condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.slaapkamer
|
|
state: 'on'
|
|
action:
|
|
- service: switch.turn_off
|
|
entity_id: switch.slaapkamer
|
|
- alias: Drukknop slaapkamer Fien
|
|
id: Drukknop slaapkamer Fien
|
|
trigger:
|
|
- device_id: 162587af4294487a9b128a96f1666500
|
|
domain: zha
|
|
platform: device
|
|
type: remote_button_short_press
|
|
subtype: remote_button_short_press
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.fien") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.fien
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.fien
|
|
brightness: 255
|
|
rgb_color:
|
|
- 255
|
|
- 236
|
|
- 182
|
|
- alias: Slaapkamer Noor licht
|
|
id: d0467a85-0e2b-4b05-9255-c1fe15316291
|
|
mode: restart
|
|
max_exceeded: silent
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_noor_aqara_pir
|
|
from: 'off'
|
|
to: 'on'
|
|
id: presence
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_noor_bezetting
|
|
from: 'off'
|
|
to: 'on'
|
|
id: presence
|
|
- device_id: 33d2050e6c144c54beb87dd3f12e8b92
|
|
domain: zha
|
|
platform: device
|
|
type: remote_button_short_press
|
|
subtype: remote_button_short_press
|
|
id: zha
|
|
- platform: state
|
|
entity_id: light.noor
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.nphone_focus
|
|
from: 'off'
|
|
to: 'on'
|
|
id: focus_on
|
|
actions:
|
|
- delay:
|
|
milliseconds: 200
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: presence
|
|
- condition: state
|
|
entity_id: binary_sensor.noor_bezetting
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: device_tracker.nphone_bermuda
|
|
state: not_home
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'on'
|
|
sequence:
|
|
- action: light.turn_on
|
|
entity_id: light.noor
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(hours=2) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.slaapkamer_noor_verlichting_end_time
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.noor_bezetting
|
|
from: 'on'
|
|
to: 'off'
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.slaapkamer_noor_verlichting_end_time
|
|
- conditions:
|
|
- condition: trigger
|
|
id: presence
|
|
- condition: state
|
|
entity_id: binary_sensor.noor_bezetting
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.nphone_focus
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: device_tracker.nphone_bermuda
|
|
state: home
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'on'
|
|
sequence:
|
|
- action: light.turn_on
|
|
entity_id: light.noor
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(hours=2) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.slaapkamer_noor_verlichting_end_time
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.noor_bezetting
|
|
from: 'on'
|
|
to: 'off'
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.slaapkamer_noor_verlichting_end_time
|
|
- conditions:
|
|
- condition: trigger
|
|
id: focus_on
|
|
- condition: state
|
|
entity_id: binary_sensor.noor_bezetting
|
|
state: 'on'
|
|
sequence:
|
|
- action: light.turn_off
|
|
data:
|
|
transition: 120
|
|
target:
|
|
entity_id: light.noor
|
|
- conditions:
|
|
- condition: trigger
|
|
id: zha
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("light.noor") == ''on'' }}
|
|
|
|
'
|
|
sequence:
|
|
- action: light.turn_off
|
|
entity_id:
|
|
- light.noor
|
|
default:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.noor
|
|
brightness: 255
|
|
rgb_color:
|
|
- 255
|
|
- 236
|
|
- 182
|
|
default:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=120) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.slaapkamer_noor_verlichting_end_time
|
|
- alias: Slaap na de nacht
|
|
id: 7e9cc1fa-4db2-433a-a372-043d538d13a9
|
|
description: Input boolean Giel slaapt na de nacht
|
|
trigger:
|
|
- platform: time
|
|
at: '16:00:13'
|
|
- platform: state
|
|
entity_id: calendar.de_nacht
|
|
from: 'on'
|
|
to: 'off'
|
|
- platform: state
|
|
entity_id: calendar.weekend_nacht
|
|
to: 'off'
|
|
from: 'on'
|
|
condition: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: '16:00:00'
|
|
- condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: '12:00:00'
|
|
- condition: state
|
|
entity_id: binary_sensor.v_nacht
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.v_w_nacht
|
|
state: 'off'
|
|
sequence:
|
|
- action: input_boolean.turn_off
|
|
entity_id:
|
|
- input_boolean.giel_slaapt_na_nacht
|
|
default:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
mode: single
|
|
- alias: Herstarten smappee
|
|
description: Herstarten Smappee DIY wanneer unknown
|
|
id: 0f92f6c0-97b8-48f3-81f3-a67f84644b06
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.l3
|
|
id: L3
|
|
to: unknown
|
|
for:
|
|
minutes: 1
|
|
- platform: state
|
|
entity_id: sensor.v3
|
|
id: L3
|
|
to: unknown
|
|
for:
|
|
minutes: 1
|
|
- platform: state
|
|
entity_id: sensor.l2
|
|
id: L2
|
|
to: unknown
|
|
for:
|
|
minutes: 1
|
|
- platform: state
|
|
entity_id: sensor.v2
|
|
id: L2
|
|
to: unknown
|
|
for:
|
|
minutes: 1
|
|
- platform: state
|
|
entity_id: sensor.l1
|
|
id: L1
|
|
to: unknown
|
|
for:
|
|
minutes: 1
|
|
- platform: state
|
|
entity_id: sensor.v1
|
|
id: L1
|
|
to: unknown
|
|
for:
|
|
minutes: 1
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: L1
|
|
sequence:
|
|
- action: switch.turn_on
|
|
entity_id: switch.smappee_l1_herstarten
|
|
- action: persistent_notification.create
|
|
data:
|
|
message: Smappee L1 is herstart omdat er iets onbekend was
|
|
- conditions:
|
|
- condition: trigger
|
|
id: L2
|
|
sequence:
|
|
- action: switch.turn_on
|
|
entity_id: switch.smappee_l2_herstarten
|
|
- action: persistent_notification.create
|
|
data:
|
|
message: Smappee L3 is herstart omdat er iets onbekend was
|
|
- conditions:
|
|
- condition: trigger
|
|
id: L3
|
|
sequence:
|
|
- action: switch.turn_on
|
|
entity_id: switch.smappee_l3_herstarten
|
|
- action: persistent_notification.create
|
|
data:
|
|
message: Smappee L3 is herstart omdat er iets onbekend was
|
|
- id: enable_snapchat
|
|
alias: Enable snapchat
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowsnapchat
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-snapchat.txt
|
|
- id: disable_snapchat
|
|
alias: Disable snapchat
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowsnapchat
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-snapchat.txt
|
|
name: Snapchat
|
|
- alias: Hourly Solar Prediction Evaluation
|
|
description: Evalueer uurlijks welke voorspelling het beste presteert
|
|
id: f611af53-ed00-44e7-a8f2-f1fcbaf6f78e
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: 0
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.solar_evaluation_active
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{{ is_state(''binary_sensor.solar_evaluation_period'', ''on'')
|
|
}}
|
|
|
|
'
|
|
action:
|
|
- service: recorder.get_statistics
|
|
data:
|
|
start_time: '{{ now().replace(hour=0, minute=0, second=0, microsecond=0) }}'
|
|
end_time: '{{ now() }}'
|
|
statistic_ids:
|
|
- sensor.huidige_opbrengst_gefilterd
|
|
period: 5minute
|
|
types:
|
|
- mean
|
|
response_variable: daily_stats
|
|
- service: python_script.precise_solar_evaluation
|
|
data:
|
|
statistics_data: '{{ daily_stats }}'
|
|
current_time: '{{ now().isoformat() }}'
|
|
- alias: Solar Predictor Changed Notification
|
|
description: Stuur notificatie als beste voorspeller wijzigt
|
|
id: 0860fc90-a420-4fe3-97c8-5819100f2e6c
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_text.best_solar_predictor
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
|
|
- condition: template
|
|
value_template: '{{ trigger.from_state.state not in [''unknown'', ''unavailable'']
|
|
}}'
|
|
action:
|
|
- service: notify.mobile_app_gphone
|
|
data:
|
|
title: 🌞 Solar Voorspeller Gewijzigd
|
|
message: 'Beste voorspeller is gewijzigd van {{ trigger.from_state.state }}
|
|
naar {{ trigger.to_state.state }}.
|
|
|
|
Huidige scores: - Solcast: MSE {{ states(''input_number.solcast_mse'') | round(2)
|
|
}} - Solcast 10%: MSE {{ states(''input_number.solcast10_mse'') | round(2)
|
|
}} - Solcast 90%: MSE {{ states(''input_number.solcast90_mse'') | round(2)
|
|
}} - OpenMeteo: MSE {{ states(''input_number.openmeteo_mse'') | round(2) }}
|
|
|
|
'
|
|
- alias: Solcast_update
|
|
id: a87af4e7-855e-4ed6-81ee-864052d6352c
|
|
description: New API call Solcast
|
|
trigger:
|
|
- platform: time
|
|
at: 04:34:51
|
|
- platform: time
|
|
at: 05:58:51
|
|
- platform: time
|
|
at: 06:44:51
|
|
- platform: time
|
|
at: 07:34:51
|
|
- platform: time
|
|
at: 08:14:51
|
|
- platform: time
|
|
at: 09:04:51
|
|
- platform: time
|
|
at: 09:24:51
|
|
- platform: time
|
|
at: 09:44:51
|
|
- platform: time
|
|
at: '10:04:51'
|
|
- platform: time
|
|
at: '10:24:51'
|
|
- platform: time
|
|
at: '11:44:51'
|
|
- platform: time
|
|
at: '12:04:51'
|
|
- platform: time
|
|
at: '12:24:51'
|
|
- platform: time
|
|
at: '12:44:51'
|
|
- platform: time
|
|
at: '13:04:51'
|
|
- platform: time
|
|
at: '13:24:51'
|
|
- platform: time
|
|
at: '13:44:51'
|
|
- platform: time
|
|
at: '14:04:51'
|
|
- platform: time
|
|
at: '14:24:51'
|
|
- platform: time
|
|
at: '14:44:51'
|
|
- platform: time
|
|
at: '15:04:51'
|
|
- platform: time
|
|
at: '15:24:51'
|
|
- platform: time
|
|
at: '15:44:51'
|
|
- platform: time
|
|
at: '16:04:51'
|
|
- platform: time
|
|
at: '16:24:51'
|
|
- platform: time
|
|
at: '16:44:51'
|
|
- platform: time
|
|
at: '17:04:51'
|
|
- platform: time
|
|
at: '17:24:51'
|
|
- platform: time
|
|
at: '17:44:51'
|
|
- platform: time
|
|
at: '18:04:51'
|
|
- platform: time
|
|
at: '18:24:51'
|
|
- platform: time
|
|
at: '18:44:51'
|
|
- platform: time
|
|
at: '19:04:51'
|
|
- platform: time
|
|
at: '19:24:51'
|
|
- platform: time
|
|
at: '19:44:51'
|
|
- platform: time
|
|
at: '20:04:51'
|
|
- platform: time
|
|
at: '20:24:51'
|
|
- platform: time
|
|
at: '20:44:51'
|
|
- platform: time
|
|
at: '21:04:51'
|
|
- platform: time
|
|
at: '21:24:51'
|
|
- platform: time
|
|
at: '21:44:51'
|
|
- platform: time
|
|
at: '23:44:51'
|
|
actions:
|
|
- action: solcast_solar.update_forecasts
|
|
data: {}
|
|
mode: single
|
|
- alias: sonos/ps muziek uit tv
|
|
id: ad8189b2-9488-4f1d-9390-a2baaa8009bd
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.philips_tv
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: media_player.mass_living_2
|
|
attribute: app_id
|
|
to: TV
|
|
- platform: template
|
|
value_template: '{{ state_attr("media_player.mass_living_2","app_id") == "x-sonos-htastream"
|
|
}}
|
|
|
|
'
|
|
- platform: template
|
|
id: music_off
|
|
value_template: '{% set sourcelist = ["TV VLAANDEREN", "Netflix", "VRT MAX", "Streamz",
|
|
"YouTube", "VTM GO"] %} {{ state_attr("media_player.philips_tv", "app_name")
|
|
is in sourcelist }}
|
|
|
|
'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: music_off
|
|
sequence:
|
|
- action: media_player.media_pause
|
|
entity_id: media_player.mass_keuken
|
|
default:
|
|
- action: homeassistant.update_entity
|
|
data: {}
|
|
target:
|
|
entity_id: sensor.ps5
|
|
- action: media_player.volume_set
|
|
data:
|
|
entity_id: media_player.philips_tv
|
|
volume_level: 0.0
|
|
- delay:
|
|
seconds: 5
|
|
- condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: '11:30:00'
|
|
before: '23:00:00'
|
|
- condition: state
|
|
entity_id: media_player.mass_keuken
|
|
state: playing
|
|
- not:
|
|
- condition: state
|
|
entity_id: sensor.ps5
|
|
state: 'on'
|
|
- action: media_player.media_pause
|
|
entity_id: media_player.mass_keuken
|
|
- alias: Sonos noor
|
|
id: 03fdc5b9-1fd1-41b8-aaf4-9def5e30760e
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_noor_bezetting
|
|
to: 'on'
|
|
id: aan
|
|
- platform: state
|
|
entity_id: binary_sensor.noor_bayesian
|
|
from: 'on'
|
|
to: 'off'
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
- condition: state
|
|
entity_id: device_tracker.nphone_bermuda
|
|
state: home
|
|
- condition: state
|
|
entity_id: input_boolean.sonos_noor
|
|
state: 'off'
|
|
sequence:
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.sonos_noor
|
|
- action: media_player.volume_set
|
|
target:
|
|
entity_id: media_player.mass_slaapkamer_noor
|
|
data:
|
|
volume_level: 0.04
|
|
- delay:
|
|
seconds: 2
|
|
- action: media_player.media_play
|
|
target:
|
|
entity_id: media_player.mass_slaapkamer_noor
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
sequence:
|
|
- action: media_player.media_pause
|
|
entity_id: media_player.mass_slaapkamer_noor
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.sonos_noor
|
|
- alias: sonos smorgens aan
|
|
id: 845eafa5-a0f1-4c17-93d0-a7b84d5a5e9a
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_aqara_pir
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_presence
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.keuken_pir
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: 08:00:00
|
|
before: '16:00:00'
|
|
- condition: state
|
|
entity_id: binary_sensor.keuken_not_playing
|
|
state: 'on'
|
|
for:
|
|
hours: 5
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: media_player.philips_tv
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Thuis
|
|
actions:
|
|
- action: media_player.join
|
|
data:
|
|
group_members:
|
|
- media_player.mass_living_2
|
|
- media_player.mass_2c
|
|
- media_player.mass_move
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
- delay:
|
|
seconds: 5
|
|
- action: media_player.volume_set
|
|
data:
|
|
volume_level: 0.14
|
|
target:
|
|
entity_id:
|
|
- media_player.mass_keuken
|
|
- media_player.mass_2c
|
|
- media_player.mass_living_2
|
|
- media_player.mass_move
|
|
- delay:
|
|
seconds: 5
|
|
- action: script.random_music
|
|
data:
|
|
sonos_entity: media_player.mass_keuken
|
|
- alias: Random muziek in de keuken
|
|
id: aad758d7-6bf2-415d-a445-f2b049948091
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.random_muziek
|
|
actions:
|
|
- action: media_player.join
|
|
data:
|
|
group_members:
|
|
- media_player.mass_living_2
|
|
- media_player.mass_2c
|
|
- media_player.mass_move
|
|
target:
|
|
entity_id: media_player.mass_keuken
|
|
- delay:
|
|
seconds: 2
|
|
- action: media_player.volume_set
|
|
data:
|
|
volume_level: 0.14
|
|
target:
|
|
entity_id:
|
|
- media_player.mass_keuken
|
|
- media_player.mass_2c
|
|
- media_player.mass_living_2
|
|
- media_player.mass_move
|
|
- delay:
|
|
seconds: 2
|
|
- action: script.random_music
|
|
data:
|
|
sonos_entity: media_player.mass_keuken
|
|
- alias: Spots tv aan bij schemering
|
|
id: fc07bb5e-9a2e-4a53-8252-f8ce84560057
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
to: 'true'
|
|
condition:
|
|
condition: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
state: disarmed
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
profile: reading
|
|
transition: 1800
|
|
- alias: Spots aan monnikenheide
|
|
id: acb79edb-f9f7-40c0-8e3d-d3e8fcdde011
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.living_bezetting
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.martine_vertrekt_naart_werk
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: light.spots_tv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: calendar.monnikenheide
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'true'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
profile: reading
|
|
- alias: Spots aan schooldag of late
|
|
id: 463b0a9c-0f70-4ccf-b095-52f8496c4361
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.living_bezetting
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: 06:30:00
|
|
before: '11:00:00'
|
|
- condition: state
|
|
entity_id: light.spots_tv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'true'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.v_late
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
profile: reading
|
|
- alias: Spots aan vroege
|
|
id: 88c47c95-cc75-4934-b670-71c94940ece1
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.living_bezetting
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: time
|
|
after: 04:00:00
|
|
before: '11:00:00'
|
|
- condition: state
|
|
entity_id: light.spots_tv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: calendar.de_vroege
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'true'
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Thuis
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_w_dag
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.v_vroege
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
profile: reading
|
|
- alias: Spots tv disco bij vertrek (iedereen)
|
|
id: f57aadf0-5e1c-4729-b8df-a7bee6e0c159
|
|
trigger:
|
|
platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
to: armed_away
|
|
condition:
|
|
condition: state
|
|
entity_id: light.spots_tv
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
effect: random
|
|
brightness: 250
|
|
- delay: 0:01
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
effect: colorloop
|
|
- alias: Spots tv aan bij schemering niemand thuis
|
|
id: 5bee2606-cd1d-4c67-9e56-e743dac7f63d
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
to: 'true'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.op_verlof
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
state: armed_home
|
|
- condition: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
state: armed_away
|
|
actions:
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
effect: random
|
|
brightness: 250
|
|
- delay: 0:01
|
|
- action: light.turn_on
|
|
entity_id: light.spots_tv
|
|
data:
|
|
effect: colorloop
|
|
- alias: Spots vertrek vroege
|
|
id: 68d49e49-8043-4c48-8eb6-a223b58524c6
|
|
trigger:
|
|
- platform: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
to: Juist Weg
|
|
condition:
|
|
condition: time
|
|
after: 04:00:00
|
|
before: 06:00:00
|
|
actions:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.spots_tv
|
|
- alias: Spots wit bij thuiskomst
|
|
id: f94efe62-f119-4763-aa2c-50c34edff73e
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
to: disarmed
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.spots_tv
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'true'
|
|
actions:
|
|
- action: homeassistant.turn_on
|
|
data:
|
|
entity_id: light.spots_tv
|
|
effect: none
|
|
- action: homeassistant.turn_on
|
|
data:
|
|
entity_id: light.spots_tv
|
|
profile: reading
|
|
- alias: Stofzuiger beneden
|
|
id: a0e8b297-6861-4b6a-a901-2a5ccda2d68c
|
|
initial_state: 'true'
|
|
trigger:
|
|
platform: time
|
|
at: '2:00:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: docked
|
|
- condition: state
|
|
entity_id: input_boolean.op_verlof
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.stofzuiger_beneden
|
|
state: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: counter.stofzuiger
|
|
state: '2'
|
|
- condition: state
|
|
entity_id: counter.stofzuiger
|
|
state: '6'
|
|
sequence:
|
|
- action: vacuum.set_fan_speed
|
|
data:
|
|
fan_speed: Full Speed
|
|
target:
|
|
entity_id: vacuum.claptrap
|
|
- action: select.select_option
|
|
data:
|
|
option: 'Off'
|
|
target:
|
|
entity_id: select.claptrap_water_level
|
|
- action: vacuum.start
|
|
data:
|
|
entity_id: vacuum.claptrap
|
|
- action: counter.increment
|
|
entity_id: counter.stofzuiger
|
|
default:
|
|
- action: vacuum.set_fan_speed
|
|
data:
|
|
fan_speed: Basic
|
|
target:
|
|
entity_id: vacuum.claptrap
|
|
- action: select.select_option
|
|
data:
|
|
option: 'Off'
|
|
target:
|
|
entity_id: select.claptrap_water_level
|
|
- action: vacuum.start
|
|
data:
|
|
entity_id: vacuum.claptrap
|
|
- action: counter.increment
|
|
entity_id: counter.stofzuiger
|
|
- alias: Stofzuiger dweilen beneden
|
|
id: 54032012-43dd-44f3-8892-1cccfc462929
|
|
initial_state: 'true'
|
|
trigger:
|
|
platform: time
|
|
at: '3:15:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: docked
|
|
- condition: template
|
|
value_template: '{{ state_attr("vacuum.claptrap", "props")["water_box_status"]
|
|
!= 0 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ state_attr("vacuum.claptrap", "props")["water_box_carriage_status"]
|
|
!= 0 }}
|
|
|
|
'
|
|
- condition: state
|
|
entity_id: input_boolean.op_verlof
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.stofzuiger_beneden
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: counter.stofzuiger
|
|
state: '5'
|
|
actions:
|
|
- action: vacuum.set_fan_speed
|
|
data:
|
|
fan_speed: Silent
|
|
target:
|
|
entity_id: vacuum.claptrap
|
|
- action: select.select_option
|
|
data:
|
|
option: Level3
|
|
target:
|
|
entity_id: select.claptrap_water_level
|
|
- action: select.select_option
|
|
target:
|
|
entity_id: select.claptrap_mop_mode
|
|
data:
|
|
option: Deep
|
|
- action: vacuum.start
|
|
data:
|
|
entity_id: vacuum.claptrap
|
|
- action: counter.increment
|
|
entity_id: counter.stofzuiger
|
|
- alias: Stofzuiger dweilen uit beneden
|
|
id: 1083e0fb-e5d5-44c6-8362-eec574d7d480
|
|
initial_state: 'true'
|
|
trigger:
|
|
platform: time
|
|
at: '5:30:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.op_verlof
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.stofzuiger_beneden
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: counter.stofzuiger
|
|
state: '6'
|
|
actions:
|
|
- action: vacuum.set_fan_speed
|
|
data:
|
|
fan_speed: Basic
|
|
target:
|
|
entity_id: vacuum.claptrap
|
|
- action: select.select_option
|
|
data:
|
|
option: 'Off'
|
|
target:
|
|
entity_id: select.claptrap_water_level
|
|
- action: select.select_option
|
|
target:
|
|
entity_id: select.claptrap_mop_mode
|
|
data:
|
|
option: Standard
|
|
- action: counter.increment
|
|
entity_id: counter.stofzuiger
|
|
- alias: Stofzuiger error
|
|
id: 6f7dcf00-cbe3-44c5-accf-ef71310d97c2
|
|
description: ''
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- vacuum.claptrap
|
|
to: error
|
|
from: cleaning
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.stofzuiger_beneden
|
|
state: 'on'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()) - as_timestamp(state_attr("automation.stofzuiger_beneden",
|
|
"last_triggered"))) < 10800 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()) - as_timestamp(state_attr("automation.stofzuiger_dweilen_beneden",
|
|
"last_triggered"))) < 10800 }}
|
|
|
|
'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states("counter.stofzuiger") is in ["5", "6"] }}
|
|
|
|
'
|
|
sequence:
|
|
- action: counter.set_value
|
|
data:
|
|
value: 3
|
|
target:
|
|
entity_id: counter.stofzuiger
|
|
- action: select.select_option
|
|
target:
|
|
entity_id: select.claptrap_mop_mode
|
|
data:
|
|
option: Standard
|
|
default:
|
|
- action: counter.decrement
|
|
target:
|
|
entity_id: counter.stofzuiger
|
|
- alias: Stofzuiger leegmaken
|
|
id: e1f88cd0-3704-4d86-9b89-4a229e234a06
|
|
initial_state: 'true'
|
|
trigger:
|
|
- platform: time
|
|
at: 06:50:00
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: counter.stofzuiger
|
|
state: '1'
|
|
- condition: state
|
|
entity_id: counter.stofzuiger
|
|
state: '7'
|
|
- condition: state
|
|
entity_id: input_boolean.stofzuiger_leegmaken_melding
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: docked
|
|
- condition: state
|
|
entity_id: input_boolean.op_verlof
|
|
state: 'off'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: counter.stofzuiger
|
|
state: '1'
|
|
sequence:
|
|
- action: notify.iedereen
|
|
data:
|
|
title: Claptrap
|
|
message: De stofzuiger mag weer leeggemaakt worden.
|
|
data:
|
|
actions:
|
|
- action: RETURN
|
|
title: Leeggemaakt. Terug in uw kot.
|
|
- action: script.turn_on
|
|
entity_id: script.bitch_prullenbak
|
|
- action: counter.increment
|
|
entity_id: counter.stofzuiger
|
|
default:
|
|
- action: notify.iedereen
|
|
data:
|
|
title: Claptrap
|
|
message: De stofzuiger mag weer leeggemaakt worden. Water eruit en dweil eraf!
|
|
data:
|
|
actions:
|
|
- action: RETURN
|
|
title: Leeggemaakt. Terug in uw kot.
|
|
- action: script.turn_on
|
|
entity_id: script.bitch_prullenbak
|
|
- action: counter.reset
|
|
entity_id: counter.stofzuiger
|
|
- alias: Stofzuiger leegmaken voor dweilen
|
|
id: 3a1e8a85-3c1a-42ae-97c3-83f9b0b32d26
|
|
initial_state: 'true'
|
|
trigger:
|
|
- platform: time
|
|
at: '16:00:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.op_verlof
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: counter.stofzuiger
|
|
state: '3'
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: docked
|
|
- condition: state
|
|
entity_id: input_boolean.stofzuiger_leegmaken_melding
|
|
state: 'on'
|
|
actions:
|
|
- action: notify.iedereen
|
|
data:
|
|
title: Claptrap
|
|
message: Onze Claptrap leegmaken. Proper water en ne nieuwe dweil geven.
|
|
data:
|
|
actions:
|
|
- action: RETURN
|
|
title: Leeggemaakt. Terug in uw kot.
|
|
- action: script.turn_on
|
|
entity_id: script.bitch_prullenbak
|
|
- action: counter.increment
|
|
entity_id: counter.stofzuiger
|
|
- alias: Stofzuiger random
|
|
id: 33d24a7e-0c62-4802-aac4-ffa4bba81d11
|
|
initial_state: 'true'
|
|
trigger:
|
|
- platform: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
from: Juist Weg
|
|
to: Afwezig
|
|
for:
|
|
minutes: 10
|
|
- platform: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
from: Juist Weg
|
|
to: Afwezig
|
|
for:
|
|
minutes: 10
|
|
condition:
|
|
- condition: state
|
|
entity_id: vacuum.claptrap
|
|
state: docked
|
|
- condition: state
|
|
entity_id: input_boolean.op_verlof
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.stofzuiger_beneden
|
|
state: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: time
|
|
after: 07:00:00
|
|
before: 09:00:00
|
|
weekday:
|
|
- mon
|
|
- tue
|
|
- wed
|
|
- thu
|
|
- fri
|
|
sequence:
|
|
- action: vacuum.set_fan_speed
|
|
data:
|
|
fan_speed: Strong
|
|
target:
|
|
entity_id: vacuum.claptrap
|
|
- action: select.select_option
|
|
data:
|
|
option: 'Off'
|
|
target:
|
|
entity_id: select.claptrap_water_level
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.vacuum_target_room
|
|
data:
|
|
option: Keuken
|
|
- action: script.vacuum_clean_room
|
|
default:
|
|
- condition: time
|
|
after: '10:00:00'
|
|
before: '14:00:00'
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: device_tracker.martine_not_so_binary
|
|
state: Thuis
|
|
- condition: state
|
|
entity_id: device_tracker.giel_not_so_binary
|
|
state: Thuis
|
|
- action: vacuum.set_fan_speed
|
|
data:
|
|
fan_speed: Full Speed
|
|
target:
|
|
entity_id: vacuum.claptrap
|
|
- action: select.select_option
|
|
data:
|
|
option: 'Off'
|
|
target:
|
|
entity_id: select.claptrap_water_level
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.vacuum_target_room
|
|
data:
|
|
option: "{{ [\n \"Keuken\",\n \"Inkom\",\n \"Danszaal\",\n \"\
|
|
Zithoek\"\n ] | random }}\n"
|
|
- action: script.vacuum_clean_room
|
|
- id: enable_streamz
|
|
alias: Enable Streamz
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowstreamz
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-streamz.txt
|
|
- id: disable_streamz
|
|
alias: Disable Streamz
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowstreamz
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-streamz.txt
|
|
name: Streamz
|
|
- alias: Thuiskomst aan/af
|
|
id: 59165b2c-f8ed-4a14-a95e-73b61f3fc4e6
|
|
trigger:
|
|
- platform: time
|
|
at: '23:02'
|
|
- platform: time
|
|
at: 08:30
|
|
actions:
|
|
- action: "{% if now().hour == 23 %}\n automation.turn_off\n{% else %}\n automation.turn_on\n\
|
|
{% endif %}\n"
|
|
entity_id: automation.welkom_allemaal_sonos_paused, automation.welkom_allemaal_sonos_playing,
|
|
automation.welkom_sonos_paused, automation.welkom_sonos_playing
|
|
- id: enable_tiktok
|
|
alias: Enable tiktok
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowtiktok
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-tiktok.txt
|
|
- id: disable_tiktok
|
|
alias: Disable tiktok
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowtiktok
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-tiktok.txt
|
|
name: TikTok
|
|
- alias: Toestellen beveiliging
|
|
description: Laten weten wanneer de ijskast of verwarming is uitgevallen.
|
|
id: 2caba416-4d71-4f30-9ba6-071395f6224c
|
|
mode: parallel
|
|
trigger:
|
|
- platform: state
|
|
entity_id: switch.keuken_ijskast
|
|
id: ijskast
|
|
to: 'off'
|
|
for:
|
|
minutes: 10
|
|
- platform: state
|
|
entity_id: switch.kelder_warmtepompboiler
|
|
id: boiler
|
|
to: 'off'
|
|
for:
|
|
minutes: 10
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: ijskast
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: De ijskast staat al 10min uit.
|
|
data:
|
|
push:
|
|
sound: default
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.keuken_ijskast
|
|
- conditions:
|
|
- condition: trigger
|
|
id: warmtepomp
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: De warmetepomp staat al 10min uit.
|
|
data:
|
|
push:
|
|
sound: default
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.kelder_warmtepomp
|
|
- conditions:
|
|
- condition: trigger
|
|
id: boiler
|
|
sequence:
|
|
- action: notify.mobile_app_gphone
|
|
data:
|
|
message: De boiler staat al 10min uit.
|
|
data:
|
|
push:
|
|
sound: default
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.kelder_warmtepompboiler
|
|
- alias: Trigger alarm
|
|
id: b089d944-00eb-4e69-8be4-18be18af8759
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.tuin_bezetting
|
|
to: 'on'
|
|
for:
|
|
seconds: 15
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.martine_vertrekt_naart_werk
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.giel_vertrekt_naart_werk
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
state: armed_away
|
|
- condition: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
state: armed_home
|
|
- condition: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
state: armed_night
|
|
actions:
|
|
- action: alarm_control_panel.alarm_trigger
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
- alias: Turn off pv excess control
|
|
id: 3daca03e-26d2-4665-a060-d655025496df
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.wasmachien_staat_op
|
|
to: 'off'
|
|
id: wasmachien
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.droogkast_staat_op
|
|
to: 'off'
|
|
id: droogkast
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.afwasmachien_staat_op
|
|
to: 'off'
|
|
id: afwasmachien
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: wasmachien
|
|
sequence:
|
|
- service: automation.turn_off
|
|
data:
|
|
stop_actions: false
|
|
target:
|
|
entity_id: automation.wasmachien_optimizer
|
|
- conditions:
|
|
- condition: trigger
|
|
id: afwasmachien
|
|
sequence:
|
|
- service: automation.turn_off
|
|
data:
|
|
stop_actions: false
|
|
target:
|
|
entity_id: automation.afwasmachien_optimizer
|
|
- conditions:
|
|
- condition: trigger
|
|
id: droogkast
|
|
sequence:
|
|
- service: automation.turn_off
|
|
data:
|
|
stop_actions: false
|
|
target:
|
|
entity_id: automation.droogkast_optimizer
|
|
mode: single
|
|
- alias: Turn on pv excess control
|
|
id: 960f664c-f0c0-4800-881c-06bf2dc945ad
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.wasmachien
|
|
id: wasmachien
|
|
- platform: state
|
|
entity_id: input_button.droogkast
|
|
id: droogkast
|
|
- platform: state
|
|
entity_id: input_button.afwasmachien
|
|
id: afwasmachien
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: wasmachien
|
|
sequence:
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.wasmachien
|
|
- service: automation.turn_on
|
|
target:
|
|
entity_id: automation.wasmachien_optimizer
|
|
- conditions:
|
|
- condition: trigger
|
|
id: afwasmachien
|
|
sequence:
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.afwasmachien
|
|
- service: automation.turn_on
|
|
target:
|
|
entity_id: automation.afwasmachien_optimizer
|
|
- conditions:
|
|
- condition: trigger
|
|
id: droogkast
|
|
sequence:
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.droogkast
|
|
- service: automation.turn_on
|
|
target:
|
|
entity_id: automation.droogkast_optimizer
|
|
mode: single
|
|
- id: '1588617733442'
|
|
alias: Tv der kinders uit
|
|
description: Tv der kinders uit
|
|
trigger:
|
|
- platform: time
|
|
at: '22:30'
|
|
- platform: time
|
|
at: '22:00'
|
|
condition:
|
|
- condition: state
|
|
entity_id: media_player.tv_der_kinders
|
|
state: 'on'
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: time
|
|
before: '22:10:00'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
- condition: and
|
|
conditions:
|
|
- condition: time
|
|
weekday:
|
|
- sun
|
|
- condition: state
|
|
entity_id: calendar.belgie_verlof
|
|
state: 'off'
|
|
sequence:
|
|
- action: media_player.turn_off
|
|
entity_id:
|
|
- media_player.tv_der_kinders
|
|
default:
|
|
- action: media_player.turn_off
|
|
entity_id: media_player.tv_der_kinders
|
|
- alias: TV Volume op 0 houden
|
|
id: c4175e45-eb8f-44e3-a0b5-0c41d861cbdf
|
|
mode: queued
|
|
trigger:
|
|
- platform: time_pattern
|
|
seconds: /10
|
|
condition:
|
|
- condition: state
|
|
entity_id: media_player.philips_tv
|
|
state: 'on'
|
|
action:
|
|
- service: homeassistant.update_entity
|
|
target:
|
|
entity_id: media_player.philips_tv
|
|
- delay:
|
|
seconds: 2
|
|
- condition: template
|
|
value_template: '{{ state_attr(''media_player.philips_tv'', ''volume_level'')
|
|
> 0 }}'
|
|
- service: media_player.volume_set
|
|
target:
|
|
entity_id: media_player.philips_tv
|
|
data:
|
|
volume_level: 0
|
|
- id: '1596733904625'
|
|
alias: Unavailable & batteryentities sensor update
|
|
description: ''
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /33
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()) - as_timestamp(states("sensor.uptime")))
|
|
/ 3600 | float > 0.05 | float }}
|
|
|
|
'
|
|
actions:
|
|
- action: python_script.unavailable
|
|
- alias: Uncheck media todo
|
|
id: a9254cf1-0d4e-436b-b2d5-23a42b4f71b7
|
|
mode: single
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ states(\"todo.playlists\") | int == 0 or\n states(\"todo.radio_stations\"\
|
|
) | int == 0 }}\n"
|
|
actions:
|
|
- action: script.uncheck_media_todo
|
|
- alias: Update OpenUV every 50min while the sun is at least 10 degrees above the
|
|
horizon
|
|
id: a76736f6-a5c1-40a6-b764-2f4c3786c04b
|
|
trigger:
|
|
platform: time_pattern
|
|
minutes: /50
|
|
condition:
|
|
condition: numeric_state
|
|
entity_id: sun.sun
|
|
value_template: '{{ state.attributes.elevation }}'
|
|
above: 10
|
|
actions:
|
|
- action: homeassistant.update_entity
|
|
target:
|
|
entity_id: sensor.current_uv_index
|
|
- delay:
|
|
minutes: 1
|
|
- alias: OpenUV unavailable
|
|
condition: state
|
|
entity_id: sensor.current_uv_level
|
|
state: unavailable
|
|
- delay:
|
|
minutes: 1
|
|
- action: homeassistant.update_entity
|
|
target:
|
|
entity_id: sensor.current_uv_index
|
|
- alias: Licht uit avond
|
|
id: 32aa0181-1e81-4446-8bdd-ad60b9b65e8f
|
|
trigger:
|
|
platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
to: armed_night
|
|
from: arming
|
|
actions:
|
|
- delay:
|
|
minutes: 3
|
|
- action: homeassistant.turn_off
|
|
entity_id: light.alle_tuinverlichting
|
|
- delay:
|
|
minutes: 1
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.spots_tv
|
|
- action: light.turn_off
|
|
entity_id: light.waskot
|
|
- action: light.turn_off
|
|
entity_id: light.wc
|
|
- action: light.turn_off
|
|
entity_id: light.danszaal_luster
|
|
- action: light.turn_off
|
|
entity_id: light.keuken_luster
|
|
- action: light.turn_off
|
|
entity_id: light.zithoek_luster
|
|
- action: light.turn_off
|
|
entity_id: light.keuken_inkom
|
|
- action: light.turn_off
|
|
entity_id: light.keuken_spots
|
|
- action: light.turn_off
|
|
entity_id: light.danszaal_spots
|
|
- alias: Op festival uit?
|
|
id: fadfb85b-2200-498e-aea4-e8eecfa09957
|
|
trigger:
|
|
- platform: state
|
|
entity_id: calendar.festivallekes
|
|
to: 'off'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.op_verlof'', ''on'') }}'
|
|
actions:
|
|
- wait_template: '{{ now().hour == 9 }}'
|
|
- action: notify.giel_en_martine
|
|
data_template:
|
|
message: Gaan jullie naar huis vertrekken? Zet dan Vakantie-modus uit.
|
|
data:
|
|
actions:
|
|
- action: VERLOF_AAN
|
|
title: Vakantie-modus aan.
|
|
- action: VERLOF_UIT
|
|
title: Vakantie-modus uit.
|
|
- alias: Verluchting 1u Aan
|
|
id: c9229ffd-c000-42c0-b499-9c4a3a300927
|
|
trigger:
|
|
- platform: time
|
|
at: 01:00
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.buiten_fris_genoeg
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.buitentemperatuur_gefilterd
|
|
above: 10
|
|
- condition: state
|
|
entity_id: input_boolean.verluchting_afkoeling
|
|
state: 'off'
|
|
actions:
|
|
- action: script.turn_on
|
|
entity_id: script.verluchting_1_uur
|
|
- alias: Verluchting 2u aan
|
|
id: cec7e5ad-31f9-4207-b256-f9cb5f4affb0
|
|
trigger:
|
|
- platform: time
|
|
at: '11:00'
|
|
- platform: time
|
|
at: '16:00'
|
|
- platform: time
|
|
at: 01:00
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.buiten_fris_genoeg
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.verluchting_afkoeling
|
|
state: 'off'
|
|
actions:
|
|
- action: script.turn_on
|
|
entity_id: script.verluchting_2_uur
|
|
- alias: Verluchting Afkoeling
|
|
id: b7bc2700-3167-44bd-8a11-b75dcbc50dd0
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.afkoeling_gewenst
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.afkoeling_gewenst
|
|
state: 'on'
|
|
actions:
|
|
- action: switch.turn_on
|
|
entity_id: switch.badkamer_verluchting
|
|
- action: switch.turn_on
|
|
entity_id: switch.zolder_verluchting
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.verluchting_afkoeling
|
|
- alias: Verluchting Afkoeling Uit
|
|
id: 3730dffd-c23d-40ac-bca8-d84821652fc4
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.afkoeling_gewenst
|
|
from: 'on'
|
|
to: 'off'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.afkoeling_gewenst
|
|
state: 'off'
|
|
actions:
|
|
- action: switch.turn_off
|
|
entity_id: switch.badkamer_verluchting
|
|
- action: switch.turn_off
|
|
entity_id: switch.zolder_verluchting
|
|
- action: input_boolean.turn_off
|
|
entity_id: input_boolean.verluchting_afkoeling
|
|
- alias: Verluchting te vochtig
|
|
id: 0ac1bc1f-98e8-4d13-8626-3a71c4bfe7f5
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.keuken_luchtvochtigheid
|
|
above: 95
|
|
for:
|
|
seconds: 60
|
|
- platform: state
|
|
entity_id: binary_sensor.badkamer_trend_up
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.badkamer_luchtvochtigheid
|
|
below: 101
|
|
- condition: numeric_state
|
|
entity_id: sensor.keuken_luchtvochtigheid
|
|
below: 101
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.badkamer_trend_down
|
|
state: 'off'
|
|
for:
|
|
minutes: 10
|
|
- condition: numeric_state
|
|
entity_id: sensor.badkamer_luchtvochtigheid
|
|
above: 70
|
|
actions:
|
|
- action: script.turn_on
|
|
entity_id: script.verluchting_1_uur
|
|
- alias: Verwarming Aan/Uit
|
|
id: faac69de-f54b-4ac5-82c1-4de36624c400
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
to: armed_night
|
|
id: uit
|
|
- platform: state
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
from: armed_night
|
|
to: disarmed
|
|
id: aan
|
|
- platform: template
|
|
value_template: '{{ states("binary_sensor.gphone_focus") == "off" and states("device_tracker.gphone_bermuda")
|
|
== "home" }}
|
|
|
|
'
|
|
id: aan_slaapkamer
|
|
- platform: template
|
|
value_template: '{{ states("binary_sensor.mphone_focus") == "off" and states("device_tracker.mphone_bermuda")
|
|
== "home" }}
|
|
|
|
'
|
|
id: aan_slaapkamer
|
|
- platform: template
|
|
value_template: '{{ states("binary_sensor.nphone_focus") == "off" and states("device_tracker.nphone_bermuda")
|
|
== "home" }}
|
|
|
|
'
|
|
id: aan_slaapkamer_noor
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
sequence:
|
|
- delay:
|
|
minutes: 15
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id:
|
|
- climate.slaapkamer
|
|
- climate.fien
|
|
- climate.noor
|
|
data:
|
|
preset_mode: away
|
|
- action: automation.turn_off
|
|
target:
|
|
entity_id:
|
|
- automation.verwarming_bij_aanwezigheid_fien
|
|
- automation.verwarming_bij_aanwezigheid_noor
|
|
- automation.verwarming_bij_aanwezigheid_slaapkamer
|
|
data:
|
|
stop_actions: true
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
sequence:
|
|
- action: automation.turn_on
|
|
target:
|
|
entity_id:
|
|
- automation.verwarming_bij_aanwezigheid_fien
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan_slaapkamer
|
|
- condition: template
|
|
value_template: '{{ states("binary_sensor.gphone_focus") == "off" and states("binary_sensor.mphone_focus")
|
|
== "off" }}
|
|
|
|
'
|
|
sequence:
|
|
- action: automation.turn_on
|
|
target:
|
|
entity_id:
|
|
- automation.verwarming_bij_aanwezigheid_slaapkamer
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan_slaapkamer_noor
|
|
sequence:
|
|
- action: automation.turn_on
|
|
target:
|
|
entity_id:
|
|
- automation.verwarming_bij_aanwezigheid_noor
|
|
- alias: Verwarming bij aanwezigheid badkamer
|
|
id: b57adf81-739a-4fa1-befa-993d097b3946
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.badkamer_bezetting
|
|
to: 'on'
|
|
id: aan
|
|
- platform: state
|
|
entity_id: binary_sensor.badkamer_bezetting
|
|
to: 'off'
|
|
id: uit
|
|
- platform: state
|
|
entity_id: binary_sensor.badkamer_hoog_drukknop
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.badkamer
|
|
data:
|
|
preset_mode: home
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.badkamer
|
|
data:
|
|
preset_mode: away
|
|
- alias: Verwarming bij aanwezigheid Fien
|
|
id: c56835b5-85a0-48b1-b41d-781033aa6b04
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_fien_bezetting
|
|
to: 'on'
|
|
id: aan
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_fien_bezetting
|
|
to: 'off'
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
- condition: state
|
|
entity_id: input_boolean.giel_slaapt_na_nacht
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: '{{ states("alarm_control_panel.ha_alarm") != "armed_night"
|
|
}}
|
|
|
|
'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.fien
|
|
data:
|
|
preset_mode: home
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
- condition: template
|
|
value_template: '{{ states("alarm_control_panel.ha_alarm") != "armed_night"
|
|
}}
|
|
|
|
'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.fien
|
|
data:
|
|
preset_mode: away
|
|
- conditions:
|
|
- condition: trigger
|
|
id: sleep
|
|
- condition: template
|
|
value_template: '{{ states("device_tracker.fphone_bermuda") == "home" }}
|
|
|
|
'
|
|
- condition: time
|
|
after: '20:00:00'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.fien
|
|
data:
|
|
preset_mode: sleep
|
|
default:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.fien
|
|
data:
|
|
preset_mode: away
|
|
- alias: Verwarming bij aanwezigheid garage
|
|
id: ea3527a0-1e19-4aeb-9dde-dee3140ef424
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_bezetting
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_bezetting
|
|
to: 'off'
|
|
actions:
|
|
- action: climate.set_hvac_mode
|
|
data_template:
|
|
entity_id: climate.garage
|
|
hvac_mode: "{% if is_state('binary_sensor.garage_bezetting', 'on') %}\n heat\n\
|
|
{% elif is_state('binary_sensor.garage_bezetting', 'off') %}\n off\n{% endif\
|
|
\ %}\n"
|
|
- alias: Verwarming altijd uit bij afwezigheid garage
|
|
id: ed0fdef6-d669-4850-b375-86fb3b4c19f1
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_bezetting
|
|
to: 'off'
|
|
actions:
|
|
- action: climate.turn_off
|
|
entity_id: climate.garage
|
|
- alias: Verwarming bij aanwezigheid Noor
|
|
id: 3d5f6875-5f9c-4d6e-b219-5bcb27d79681
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_noor_bezetting
|
|
to: 'on'
|
|
id: aan
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_noor_bezetting
|
|
to: 'off'
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
- condition: template
|
|
value_template: '{{ states("alarm_control_panel.ha_alarm") != "armed_night"
|
|
}}
|
|
|
|
'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.noor
|
|
data:
|
|
preset_mode: home
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
- condition: template
|
|
value_template: '{{ states("alarm_control_panel.ha_alarm") != "armed_night"
|
|
}}
|
|
|
|
'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.noor
|
|
data:
|
|
preset_mode: away
|
|
- conditions:
|
|
- condition: trigger
|
|
id: sleep
|
|
- condition: template
|
|
value_template: '{{ states("device_tracker.nphone_bermuda") == "home" }}
|
|
|
|
'
|
|
- condition: time
|
|
after: '20:00:00'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.noor
|
|
data:
|
|
preset_mode: sleep
|
|
default:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.noor
|
|
data:
|
|
preset_mode: away
|
|
- alias: Verwarming bij aanwezigheid slaapkamer
|
|
id: a31ca706-795a-4098-97e9-e70b2085daf5
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_bezetting
|
|
to: 'on'
|
|
id: aan
|
|
- platform: state
|
|
entity_id: binary_sensor.slaapkamer_bezetting
|
|
to: 'off'
|
|
id: uit
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
- condition: template
|
|
value_template: '{{ states("alarm_control_panel.ha_alarm") != "armed_night"
|
|
}}
|
|
|
|
'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.slaapkamer
|
|
data:
|
|
preset_mode: home
|
|
- conditions:
|
|
- condition: trigger
|
|
id: uit
|
|
- condition: template
|
|
value_template: '{{ states("alarm_control_panel.ha_alarm") != "armed_night"
|
|
}}
|
|
|
|
'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.slaapkamer
|
|
data:
|
|
preset_mode: away
|
|
- conditions:
|
|
- condition: trigger
|
|
id: sleep
|
|
- condition: template
|
|
value_template: '{{ states("device_tracker.mphone_bermuda") == "home" or states("device_tracker.gphone_bermuda")
|
|
== "home" }}
|
|
|
|
'
|
|
- condition: time
|
|
after: '20:00:00'
|
|
sequence:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.slaapkamer
|
|
data:
|
|
preset_mode: sleep
|
|
default:
|
|
- action: climate.set_preset_mode
|
|
target:
|
|
entity_id: climate.slaapkamer
|
|
data:
|
|
preset_mode: away
|
|
- alias: Light inkom voordeur open
|
|
id: 2f446421-a602-42cf-9445-000080ac913b
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.gang_voordeur
|
|
to: 'on'
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.gang_boven
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: light.gang_beneden
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: sensor.dark_inside
|
|
state: 'true'
|
|
actions:
|
|
- action: light.turn_on
|
|
data:
|
|
entity_id: light.gang_beneden
|
|
- alias: Warmtepomp aan/af
|
|
id: 69a5766a-bde3-4a53-aca6-6ca47a28ce78
|
|
description: Shelly afzetten wanneer er geen verwarming nodig is
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.emhass_warmtepomp
|
|
to: 'on'
|
|
id: aan
|
|
- platform: state
|
|
entity_id: input_boolean.emhass_warmtepomp
|
|
to: 'off'
|
|
id: uit
|
|
- platform: state
|
|
entity_id: switch.verwarming
|
|
to: 'on'
|
|
id: aan
|
|
- platform: state
|
|
entity_id: switch.verwarming
|
|
to: 'off'
|
|
id: uit
|
|
- platform: state
|
|
entity_id:
|
|
- climate.living
|
|
attribute: hvac_action
|
|
to: heating
|
|
id: aan
|
|
- platform: state
|
|
entity_id:
|
|
- climate.living
|
|
attribute: hvac_action
|
|
to: idle
|
|
id: uit
|
|
condition: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: aan
|
|
sequence:
|
|
- action: switch.turn_on
|
|
entity_id:
|
|
- switch.kelder_warmtepomp
|
|
default:
|
|
- delay:
|
|
seconds: 30
|
|
- action: switch.turn_off
|
|
entity_id: switch.kelder_warmtepomp
|
|
mode: single
|
|
- alias: Control excess control wasmachien
|
|
id: c0faeb7f-244b-4f74-b7b6-4288383b56e0
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- switch.wasmachien
|
|
to: 'off'
|
|
from: 'on'
|
|
id: switch
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.wasmachien_staat_op
|
|
to: 'off'
|
|
id: automation
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.wasmachien
|
|
state: 'off'
|
|
- condition: trigger
|
|
id: switch
|
|
sequence:
|
|
- service: automation.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: automation.wasmachien_optimizer
|
|
- conditions:
|
|
- condition: trigger
|
|
id: automation
|
|
sequence:
|
|
- service: automation.turn_off
|
|
data:
|
|
stop_actions: false
|
|
target:
|
|
entity_id: automation.wasmachien_optimizer
|
|
mode: single
|
|
- alias: beveiliging verwarming wc
|
|
id: e0250f04-7ade-43e7-8f30-ea8c00370d08
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /5
|
|
seconds: 0
|
|
condition:
|
|
condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.wc
|
|
state: 'on'
|
|
action:
|
|
- service: switch.turn_off
|
|
entity_id: switch.wc
|
|
- alias: Bad weather notification - clear
|
|
id: 45a4e1d5-aa55-4c81-b15e-337eed05db82
|
|
trigger:
|
|
- platform: time
|
|
at: 07:00:00
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sensor.bad_weather
|
|
state: clear
|
|
actions:
|
|
- variables:
|
|
direction: '{% set directions = [ ''N'', ''NNO'', ''NO'', ''ONO'', ''O'', ''OZO'',
|
|
''ZO'', ''ZZO'', ''Z'', ''ZZW'', ''ZW'', ''WZW'', ''W'', ''WNW'', ''NW'',
|
|
''NNW'', ''N''] -%} {% set idx = (state_attr("weather.home", "wind_bearing")
|
|
| int(0) / 22.5) | round(0) | int -%} {{ directions[idx] }}
|
|
|
|
'
|
|
fiets: "{% if direction in [\"N\", \"NNO\", \"NO\", \"ONO\", \"O\"] %}\n ,\
|
|
\ dus wind op kop.\n{% elif direction in [\"Z\", \"ZZW\", \"ZW\", \"WZW\"\
|
|
, \"W\"] %}\n , dus wind in de rug.\n{% else %}\n , dus de wind staat niet\
|
|
\ goed of slecht.\n{% endif %}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
sequence:
|
|
- action: notify.mobile_app_mphone
|
|
data:
|
|
message: '" Het is nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit
|
|
}}, {{ states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- action: notify.noor_en_fien
|
|
data:
|
|
message: '" Het is nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit
|
|
}}, {{ states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'off'
|
|
sequence:
|
|
- action: notify.mobile_app_mphone
|
|
data:
|
|
message: '" Het is nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit
|
|
}}, {{ states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
sequence:
|
|
- action: notify.noor_en_fien
|
|
data:
|
|
message: '" Het is nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit
|
|
}}, {{ states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- alias: Bad weather notification - frost
|
|
id: 177426d9-8cd4-47fa-852b-ba466e36bfb9
|
|
trigger:
|
|
- platform: time
|
|
at: 07:00:00
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sensor.bad_weather
|
|
state: frost
|
|
actions:
|
|
- variables:
|
|
direction: '{% set directions = [ ''N'', ''NNO'', ''NO'', ''ONO'', ''O'', ''OZO'',
|
|
''ZO'', ''ZZO'', ''Z'', ''ZZW'', ''ZW'', ''WZW'', ''W'', ''WNW'', ''NW'',
|
|
''NNW'', ''N''] -%} {% set idx = (state_attr("weather.home", "wind_bearing")
|
|
| int(0) / 22.5) | round(0) | int -%} {{ directions[idx] }}
|
|
|
|
'
|
|
fiets: "{% if direction in [\"N\", \"NNO\", \"NO\", \"ONO\", \"O\"] %}\n ,\
|
|
\ dus wind op kop.\n{% elif direction in [\"Z\", \"ZZW\", \"ZW\", \"WZW\"\
|
|
, \"W\"] %}\n , dus wind in de rug.\n{% else %}\n , dus de wind staat niet\
|
|
\ goed of slecht.\n{% endif %}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
sequence:
|
|
- action: notify.mobile_app_mphone
|
|
data:
|
|
message: '" Er wordt ijzel voorspeld, op tijd vertrekken! Het is nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit
|
|
}}, {{ states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- action: notify.noor_en_fien
|
|
data:
|
|
message: '" Er wordt ijzel voorspeld, op tijd vertrekken! Het is nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit
|
|
}}, {{ states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'off'
|
|
sequence:
|
|
- action: notify.mobile_app_mphone
|
|
data:
|
|
message: '" Er wordt ijzel voorspeld, op tijd vertrekken! Het is nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit
|
|
}}, {{ states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
sequence:
|
|
- action: notify.noor_en_fien
|
|
data:
|
|
message: '" Er wordt ijzel voorspeld, op tijd vertrekken! Het is nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit
|
|
}}, {{ states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- alias: Bad weather notification - heavy_rain
|
|
id: 616a6577-504c-4c5f-a85e-f17d4737561c
|
|
trigger:
|
|
- platform: time
|
|
at: 07:00:00
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sensor.bad_weather
|
|
state: heavy_rain
|
|
actions:
|
|
- variables:
|
|
direction: '{% set directions = [ ''N'', ''NNO'', ''NO'', ''ONO'', ''O'', ''OZO'',
|
|
''ZO'', ''ZZO'', ''Z'', ''ZZW'', ''ZW'', ''WZW'', ''W'', ''WNW'', ''NW'',
|
|
''NNW'', ''N''] -%} {% set idx = (state_attr("weather.home", "wind_bearing")
|
|
| int(0) / 22.5) | round(0) | int -%} {{ directions[idx] }}
|
|
|
|
'
|
|
fiets: "{% if direction in [\"N\", \"NNO\", \"NO\", \"ONO\", \"O\"] %}\n ,\
|
|
\ dus wind op kop.\n{% elif direction in [\"Z\", \"ZZW\", \"ZW\", \"WZW\"\
|
|
, \"W\"] %}\n , dus wind in de rug.\n{% else %}\n , dus de wind staat niet\
|
|
\ goed of slecht.\n{% endif %}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
sequence:
|
|
- action: notify.mobile_app_mphone
|
|
data:
|
|
message: '" Er wordt hevige regen voorspeld, op tijd vertrekken! Het is
|
|
nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit }}, {{
|
|
states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- action: notify.noor_en_fien
|
|
data:
|
|
message: '" Er wordt hevige regen voorspeld, op tijd vertrekken! Het is
|
|
nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit }}, {{
|
|
states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'off'
|
|
sequence:
|
|
- action: notify.mobile_app_mphone
|
|
data:
|
|
message: '" Er wordt hevige regen voorspeld, op tijd vertrekken! Het is
|
|
nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit }}, {{
|
|
states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
sequence:
|
|
- action: notify.noor_en_fien
|
|
data:
|
|
message: '" Er wordt hevige regen voorspeld, op tijd vertrekken! Het is
|
|
nu {{ states.sensor.buitentemperatuur_gefilterd.state_with_unit }}, {{
|
|
states("weather.home") }} en de wind waait {{ states("sensor.windsnelheid",
|
|
with_unit=True) }} uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- alias: Bad weather notification - snow
|
|
id: 5925a607-92b1-4a00-887d-5088af2069f2
|
|
trigger:
|
|
- platform: time
|
|
at: 07:00:00
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sensor.bad_weather
|
|
state: snow
|
|
actions:
|
|
- variables:
|
|
direction: '{% set directions = [ ''N'', ''NNO'', ''NO'', ''ONO'', ''O'', ''OZO'',
|
|
''ZO'', ''ZZO'', ''Z'', ''ZZW'', ''ZW'', ''WZW'', ''W'', ''WNW'', ''NW'',
|
|
''NNW'', ''N''] -%} {% set idx = (state_attr("weather.home", "wind_bearing")
|
|
| int(0) / 22.5) | round(0) | int -%} {{ directions[idx] }}
|
|
|
|
'
|
|
fiets: "{% if direction in [\"N\", \"NNO\", \"NO\", \"ONO\", \"O\"] %}\n ,\
|
|
\ dus wind op kop.\n{% elif direction in [\"Z\", \"ZZW\", \"ZW\", \"WZW\"\
|
|
, \"W\"] %}\n , dus wind in de rug.\n{% else %}\n , dus de wind staat niet\
|
|
\ goed of slecht.\n{% endif %}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
sequence:
|
|
- action: notify.mobile_app_mphone
|
|
data:
|
|
message: '" Er wordt sneeuw voorspeld, op tijd vertrekken! Het is nu {{
|
|
states.sensor.buitentemperatuur_gefilterd.state_with_unit }}, {{ states("weather.home")
|
|
}} en de wind waait {{ states("sensor.windsnelheid", with_unit=True) }}
|
|
uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- action: notify.noor_en_fien
|
|
data:
|
|
message: '" Er wordt sneeuw voorspeld, op tijd vertrekken! Het is nu {{
|
|
states.sensor.buitentemperatuur_gefilterd.state_with_unit }}, {{ states("weather.home")
|
|
}} en de wind waait {{ states("sensor.windsnelheid", with_unit=True) }}
|
|
uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'off'
|
|
sequence:
|
|
- action: notify.mobile_app_mphone
|
|
data:
|
|
message: '" Er wordt sneeuw voorspeld, op tijd vertrekken! Het is nu {{
|
|
states.sensor.buitentemperatuur_gefilterd.state_with_unit }}, {{ states("weather.home")
|
|
}} en de wind waait {{ states("sensor.windsnelheid", with_unit=True) }}
|
|
uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.v_monnikenheide
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'on'
|
|
sequence:
|
|
- action: notify.noor_en_fien
|
|
data:
|
|
message: '" Er wordt sneeuw voorspeld, op tijd vertrekken! Het is nu {{
|
|
states.sensor.buitentemperatuur_gefilterd.state_with_unit }}, {{ states("weather.home")
|
|
}} en de wind waait {{ states("sensor.windsnelheid", with_unit=True) }}
|
|
uit het {{ direction }} {{ fiets }} "
|
|
|
|
'
|
|
- id: enable_whatsapp
|
|
alias: Enable Whatsapp
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowwhatsapp
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-whatsapp.txt
|
|
- id: disable_whatsapp
|
|
alias: Disable Whatsapp
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowwhatsapp
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-whatsapp.txt
|
|
name: Whatsapp
|
|
- alias: Zonnewering winter
|
|
id: 12930512-2ad9-43f8-a711-1538e0d1fb47
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
to: 'true'
|
|
id: sluiten
|
|
for:
|
|
minutes: 5
|
|
- platform: template
|
|
id: openen
|
|
value_template: '{{ states("sensor.windsnelheid") | int(0) > 40 }}
|
|
|
|
'
|
|
- platform: template
|
|
id: openen
|
|
value_template: '{{ states("sensor.windvlaag") | int(0) > 60 }}
|
|
|
|
'
|
|
- platform: template
|
|
value_template: "{% if states(\"sensor.regen_komende_10_minuten\") != \"unknown\"\
|
|
\ and states(\"sensor.regen_komende_10_minuten\") != \"unavailable\" %}\n {{\
|
|
\ states(\"sensor.regen_komende_10_minuten\") | float > 0 }}\n{% else %}\n \
|
|
\ {{ states(\"sensor.neerslagverwachting_gemiddeld\") | float > 0 }}\n{% endif\
|
|
\ %}\n"
|
|
id: openen
|
|
- platform: template
|
|
value_template: "{% if states(\"sensor.neerslag_zandhoven\") != \"unknown\" and\
|
|
\ states(\"sensor.neerslag_zandhoven\") != \"unavailable\" %}\n {{ states(\"\
|
|
sensor.neerslag_zandhoven\") | float > 0 }}\n{% else %}\n {{ states(\"sensor.neerslagintensiteit\"\
|
|
) | float > 0 }}\n{% endif %}\n"
|
|
id: openen
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
to: 'false'
|
|
id: openen
|
|
- platform: state
|
|
entity_id: binary_sensor.kans_op_aanvriezen
|
|
to: 'on'
|
|
id: openen
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: sluiten
|
|
- condition: numeric_state
|
|
entity_id: sensor.min_temperatuur_buiten_voorspelling_12u
|
|
below: 10
|
|
- condition: time
|
|
after: '15:00:00'
|
|
- condition: numeric_state
|
|
entity_id: sensor.max_neerslag_volgende_12u
|
|
below: 10
|
|
- condition: template
|
|
value_template: '{{ now().month >= 9 or now().month <= 4 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ states("binary_sensor.kans_op_aanvriezen") == "off" }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.windsnelheid") | int(0) < 40 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.windvlaag") | int(0) < 60 }}
|
|
|
|
'
|
|
sequence:
|
|
- action: cover.close_cover
|
|
target:
|
|
entity_id:
|
|
- cover.keuken_1
|
|
- cover.keuken_2
|
|
- cover.living
|
|
- cover.slaapkamer
|
|
- cover.slaapkamer_noor
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.nacht_closed
|
|
- conditions:
|
|
- condition: trigger
|
|
id: openen
|
|
- condition: numeric_state
|
|
entity_id: sensor.min_temperatuur_buiten_voorspelling_12u
|
|
below: 12
|
|
- condition: template
|
|
value_template: "{{ states(\"cover.keuken_1\") != \"open\" or\n states(\"\
|
|
cover.keuken_2\") != \"open\" or\n states(\"cover.living\") != \"open\"\
|
|
\ or\n states(\"cover.slaapkamer\") != \"open\" or\n states(\"cover.slaapkamer_noor\"\
|
|
) != \"open\" }}\n"
|
|
sequence:
|
|
- action: cover.open_cover
|
|
target:
|
|
entity_id:
|
|
- cover.keuken_1
|
|
- cover.keuken_2
|
|
- cover.living
|
|
- cover.slaapkamer
|
|
- cover.slaapkamer_noor
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.nacht_closed
|
|
- alias: Wled terug uit
|
|
id: 4d3f1b01-64fa-4c2b-ab81-9dfd2b3d2875
|
|
trigger:
|
|
- platform: state
|
|
entity_id: light.wled_fien
|
|
to: 'on'
|
|
id: fien
|
|
- platform: state
|
|
entity_id: light.wled_noor
|
|
to: 'on'
|
|
id: noor
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: fien
|
|
sequence:
|
|
- action: input_button.press
|
|
entity_id:
|
|
- input_button.wled_fien_nightlight
|
|
- conditions:
|
|
- condition: trigger
|
|
id: noor
|
|
sequence:
|
|
- action: input_button.press
|
|
entity_id:
|
|
- input_button.wled_noor_nightlight
|
|
- alias: wled nightlight
|
|
id: 0885f397-d620-4085-80cc-8700c94c5bf1
|
|
mode: parallel
|
|
trigger:
|
|
- platform: event
|
|
event_type: state_changed
|
|
event_data:
|
|
entity_id: input_button.wled_noor_nightlight
|
|
id: noor
|
|
- platform: event
|
|
event_type: state_changed
|
|
event_data:
|
|
entity_id: input_button.wled_fien_nightlight
|
|
id: fien
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: noor
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=10800) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.wled_noor_end_time
|
|
- conditions:
|
|
- condition: trigger
|
|
id: fien
|
|
sequence:
|
|
- action: input_datetime.set_datetime
|
|
data:
|
|
datetime: '{{ now() + timedelta(seconds=10800) }}
|
|
|
|
'
|
|
target:
|
|
entity_id: input_datetime.wled_fien_end_time
|
|
- id: enable_youtube
|
|
alias: Enable Youtube
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowyoutube
|
|
to: 'on'
|
|
actions:
|
|
- action: adguard.remove_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-youtube.txt
|
|
- id: disable_youtube
|
|
alias: Disable Youtube
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_boolean.allowyoutube
|
|
to: 'off'
|
|
actions:
|
|
- action: adguard.add_url
|
|
data:
|
|
url: https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/adguard-youtube.txt
|
|
name: Youtube
|
|
- alias: Zijgevel openen
|
|
id: 20cf3eda-0ede-4c90-b0b8-33e1853f7114
|
|
trigger:
|
|
- platform: template
|
|
value_template: "{{ states(\"sensor.sun_azimut\") | int > 330 and\n states(\"\
|
|
sensor.buiten_temperatuur\") | int(0) > 10 }}\n"
|
|
- platform: template
|
|
value_template: "{{ states(\"sensor.sun_elevation\") | int < -10 and\n states(\"\
|
|
sensor.buiten_temperatuur\") | int(0) > 10 }}\n"
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
to: 'true'
|
|
for:
|
|
minutes: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
below: 10000
|
|
for:
|
|
minutes: 5
|
|
- platform: template
|
|
value_template: '{{ states("sensor.windsnelheid") | int(0) > 40 }}
|
|
|
|
'
|
|
- platform: template
|
|
value_template: '{{ states("sensor.windvlaag") | int(0) > 60 }}
|
|
|
|
'
|
|
- platform: template
|
|
value_template: "{% if states(\"sensor.regen_komende_10_minuten\") != \"unknown\"\
|
|
\ and states(\"sensor.regen_komende_10_minuten\") != \"unavailable\" %}\n {{\
|
|
\ states(\"sensor.regen_komende_10_minuten\") | float > 0.80 }}\n{% else %}\n\
|
|
\ {{ states(\"sensor.neerslagverwachting_gemiddeld\") | float > 0.80 }}\n\
|
|
{% endif %}\n"
|
|
- platform: template
|
|
value_template: "{% if states(\"sensor.neerslag_zandhoven\") != \"unknown\" and\
|
|
\ states(\"sensor.neerslag_zandhoven\") != \"unavailable\" %}\n {{ states(\"\
|
|
sensor.neerslag_zandhoven\") | float > 0.40 }}\n{% else %}\n {{ states(\"sensor.neerslagintensiteit\"\
|
|
) | float > 0.40 }}\n{% endif %}\n"
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.zijgevel_closed
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.living", "current_position") < 50 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.slaapkamer_noor", "current_position")
|
|
< 50 }}
|
|
|
|
'
|
|
- condition: state
|
|
entity_id: input_boolean.nacht_closed
|
|
state: 'off'
|
|
actions:
|
|
- action: script.zijgevel_openen
|
|
- delay:
|
|
minutes: 5
|
|
- action: script.zijgevel_openen
|
|
- alias: Zijgevel sluiten
|
|
id: 609710ab-bc42-47f6-a4bf-b70cce8b88a7
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
for:
|
|
minutes: 5
|
|
above: 15000
|
|
- platform: time_pattern
|
|
minutes: /12
|
|
seconds: 0
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.sun_azimut
|
|
above: 110
|
|
below: 290
|
|
- condition: numeric_state
|
|
entity_id: sun.sun
|
|
value_template: '{{ state.attributes.elevation }}'
|
|
above: 10
|
|
- condition: numeric_state
|
|
entity_id: sensor.zonne_energie_gefilterd_lowpass
|
|
above: 650
|
|
- condition: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
above: 15000
|
|
- condition: template
|
|
value_template: '{{ states("sensor.windsnelheid") | int(0) < 40 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.windvlaag") | int(0) < 60 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: "{% if states(\"sensor.regen_komende_10_minuten\") != \"unknown\"\
|
|
\ and states(\"sensor.regen_komende_10_minuten\") != \"unavailable\" %}\n\
|
|
\ {{ states(\"sensor.regen_komende_10_minuten\") | float < 0.15 }}\n{% else\
|
|
\ %}\n {{ states(\"sensor.neerslagverwachting_gemiddeld\") | float < 0.15\
|
|
\ }}\n{% endif %}\n"
|
|
- condition: template
|
|
value_template: "{% if states(\"sensor.neerslag_zandhoven\") != \"unknown\"\
|
|
\ and states(\"sensor.neerslag_zandhoven\") != \"unavailable\" %}\n {{ states(\"\
|
|
sensor.neerslag_zandhoven\") | float < 0.15 }}\n{% else %}\n {{ states(\"\
|
|
sensor.neerslagintensiteit\") | float < 0.15 }}\n{% endif %}\n"
|
|
- condition: numeric_state
|
|
entity_id: sensor.max_uv_index
|
|
above: 3
|
|
- condition: numeric_state
|
|
entity_id: sensor.buitentemperatuur_gefilterd
|
|
above: 19
|
|
- condition: numeric_state
|
|
entity_id: sensor.gemiddelde_temp_beneden
|
|
above: 22
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_temperatuur_buiten_voorspelling_12u")
|
|
| float(0) > (states("sensor.gemiddelde_temp_beneden") | float(0) - 2) }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ now().month > 3 }}'
|
|
- condition: template
|
|
value_template: '{{ now().month < 10 }}'
|
|
- condition: state
|
|
entity_id: script.achtergevel_sluiten
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.zijgevel_closed
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.living", "current_position") > 50 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.slaapkamer_noor", "current_position")
|
|
> 50 }}
|
|
|
|
'
|
|
actions:
|
|
- action: script.zijgevel_sluiten
|
|
- alias: Zonnetent inschuiven
|
|
id: 48a786d1-0219-4da1-825b-b67e5a770a8d
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.sun_azimut
|
|
above: 330
|
|
- platform: numeric_state
|
|
entity_id: sensor.sun_elevation
|
|
below: -10
|
|
- platform: state
|
|
entity_id: sensor.dark_inside
|
|
to: 'true'
|
|
for:
|
|
minutes: 5
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
below: 10000
|
|
for:
|
|
minutes: 5
|
|
- platform: template
|
|
value_template: '{{ states("sensor.windsnelheid") | int(0) > 26 }}
|
|
|
|
'
|
|
- platform: template
|
|
value_template: '{{ states("sensor.windvlaag") | int(0) > 40 }}
|
|
|
|
'
|
|
- platform: template
|
|
value_template: "{% if states(\"sensor.regen_komende_10_minuten\") != \"unknown\"\
|
|
\ and states(\"sensor.regen_komende_10_minuten\") != \"unavailable\" %}\n {{\
|
|
\ states(\"sensor.regen_komende_10_minuten\") | float > 0.4 }}\n{% else %}\n\
|
|
\ {{ states(\"sensor.neerslagverwachting_gemiddeld\") | float > 0.4 }}\n{%\
|
|
\ endif %}\n"
|
|
- platform: template
|
|
value_template: "{% if states(\"sensor.neerslag_zandhoven\") != \"unknown\" and\
|
|
\ states(\"sensor.neerslag_zandhoven\") != \"unavailable\" %}\n {{ states(\"\
|
|
sensor.neerslag_zandhoven\") | float > 0.15 }}\n{% else %}\n {{ states(\"sensor.neerslagintensiteit\"\
|
|
) | float > 0.15 }}\n{% endif %}\n"
|
|
- platform: state
|
|
entity_id: binary_sensor.zonnetent_vibratie
|
|
to: 'on'
|
|
condition:
|
|
condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.zonnetent", "current_position") > 10 }}
|
|
|
|
'
|
|
actions:
|
|
- action: cover.close_cover
|
|
data: {}
|
|
target:
|
|
entity_id: cover.zonnetent
|
|
- delay:
|
|
minutes: 3
|
|
- action: cover.close_cover
|
|
data: {}
|
|
target:
|
|
entity_id: cover.zonnetent
|
|
- alias: Zonnetent uitschuiven
|
|
id: bd69f161-08bf-4d31-aef5-19cef0dee2ab
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: /14
|
|
seconds: 0
|
|
- platform: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
for:
|
|
minutes: 5
|
|
above: 17000
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.sun_azimut
|
|
above: 105
|
|
below: 270
|
|
- condition: numeric_state
|
|
entity_id: sun.sun
|
|
value_template: '{{ state.attributes.elevation }}'
|
|
above: 10
|
|
- condition: numeric_state
|
|
entity_id: sensor.zonne_energie_gefilterd_lowpass
|
|
above: 1500
|
|
- condition: numeric_state
|
|
entity_id: sensor.buiten_lichtsterkte
|
|
above: 17000
|
|
- condition: template
|
|
value_template: '{{ states("sensor.windsnelheid") | int(0) < 20 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.windvlaag") | int(0) < 40 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: "{% if states(\"sensor.regen_komende_10_minuten\") != \"unknown\"\
|
|
\ and states(\"sensor.regen_komende_10_minuten\") != \"unavailable\" %}\n\
|
|
\ {{ states(\"sensor.regen_komende_10_minuten\") | float < 0.15 }}\n{% else\
|
|
\ %}\n {{ states(\"sensor.neerslagverwachting_gemiddeld\") | float < 0.15\
|
|
\ }}\n{% endif %}\n"
|
|
- condition: template
|
|
value_template: "{% if states(\"sensor.neerslag_zandhoven\") != \"unknown\"\
|
|
\ and states(\"sensor.neerslag_zandhoven\") != \"unavailable\" %}\n {{ states(\"\
|
|
sensor.neerslag_zandhoven\") | float < 0.15 }}\n{% else %}\n {{ states(\"\
|
|
sensor.neerslagintensiteit\") | float < 0.15 }}\n{% endif %}\n"
|
|
- condition: numeric_state
|
|
entity_id: sensor.max_uv_index
|
|
above: 3
|
|
- condition: numeric_state
|
|
entity_id: sensor.buitentemperatuur_gefilterd
|
|
above: 20
|
|
- condition: numeric_state
|
|
entity_id: sensor.gemiddelde_temp_beneden
|
|
above: 22
|
|
- condition: template
|
|
value_template: '{{ states("sensor.max_temperatuur_buiten_voorspelling_12u")
|
|
| float(0) > (states("sensor.gemiddelde_temp_beneden") | float(0) - 1) }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ now().month > 3 }}'
|
|
- condition: template
|
|
value_template: '{{ now().month < 10 }}'
|
|
- condition: template
|
|
value_template: '{{ state_attr("cover.zonnetent", "current_position") < 50 }}
|
|
|
|
'
|
|
- condition: state
|
|
entity_id: script.zijgevel_sluiten
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: script.achtergevel_sluiten
|
|
state: 'off'
|
|
actions:
|
|
- action: cover.stop_cover
|
|
data: {}
|
|
target:
|
|
entity_id: cover.zonnetent
|
|
- alias: Zwembadverwarming
|
|
id: c3214453-f469-4d01-93db-bc91d57b0eb5
|
|
description: ''
|
|
mode: single
|
|
trigger:
|
|
- platform: template
|
|
value_template: '{{ states("sensor.l1_net_terugsturen") | float(default=0)> 2000
|
|
| float(default=0)}}
|
|
|
|
'
|
|
for:
|
|
minutes: 15
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.op_verlof
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.schooldag
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: switch.zwembad
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{{ now().month >= 5 or now().month <= 9 }}
|
|
|
|
'
|
|
- condition: time
|
|
after: ' 12:00:00'
|
|
before: ' 17:00:00'
|
|
- condition: numeric_state
|
|
entity_id: sensor.in
|
|
below: 30
|
|
- condition: template
|
|
value_template: '{{ state_attr("weather.weatherbit_zandhoven", ''forecast'')[0][''temperature'']
|
|
> 23 }}
|
|
|
|
'
|
|
- condition: template
|
|
value_template: '{{ as_timestamp(now()) - as_timestamp(state_attr(''automation.zwembadverwarming'',
|
|
''last_triggered'')) | float(default=0)> 36000 }}
|
|
|
|
'
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ (states(\"sensor.solcast_solaredge_forecast_remaining_today\"\
|
|
) | float(default=0)+\n states(\"sensor.solcast_huawei_forecast\") |\
|
|
\ float(default=0)) | round(2) > 50 | float(default=0)}}"
|
|
- condition: state
|
|
entity_id: input_boolean.zwembad_warm_water_2u, input_boolean.zwembad_warm_water_3u,
|
|
input_boolean.zwembad_warm_water_4u, input_boolean.zwembad_warm_water_5u
|
|
state: 'off'
|
|
sequence:
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.zwembad_warm_water_5u
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ (states(\"sensor.solcast_solaredge_forecast_remaining_today\"\
|
|
) | float(default=0)+\n states(\"sensor.solcast_huawei_forecast\") |\
|
|
\ float(default=0)) | round(2) > 40 | float(default=0)}}"
|
|
- condition: state
|
|
entity_id: input_boolean.zwembad_warm_water_2u, input_boolean.zwembad_warm_water_3u,
|
|
input_boolean.zwembad_warm_water_4u, input_boolean.zwembad_warm_water_5u
|
|
state: 'off'
|
|
sequence:
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.zwembad_warm_water_4u
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ (states(\"sensor.solcast_solaredge_forecast_remaining_today\"\
|
|
) | float(default=0)+\n states(\"sensor.solcast_huawei_forecast\") |\
|
|
\ float(default=0)) | round(2) > 30 | float(default=0)}}"
|
|
- condition: state
|
|
entity_id: input_boolean.zwembad_warm_water_2u, input_boolean.zwembad_warm_water_3u,
|
|
input_boolean.zwembad_warm_water_4u, input_boolean.zwembad_warm_water_5u
|
|
state: 'off'
|
|
sequence:
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.zwembad_warm_water_3u
|
|
default:
|
|
- condition: time
|
|
before: '19:00:00'
|
|
- condition: state
|
|
entity_id: input_boolean.zwembad_warm_water_2u, input_boolean.zwembad_warm_water_3u,
|
|
input_boolean.zwembad_warm_water_4u, input_boolean.zwembad_warm_water_5u
|
|
state: 'off'
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.zwembad_warm_water_2u
|