AutomationDataset/miggi92/miggi92_automations.yaml

3772 lines
105 KiB
YAML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- alias: Abfallbenachrichtigung
id: f9432fc2-3051-4325-b8d6-1ba50259050b
description: Benachrichtigt wenn Abfall abgeholt wird.
trigger:
- platform: state
entity_id:
- sensor.restmull
- sensor.papier
- sensor.schadstoffe
attribute: daysTo
to: 0
id: heute
- platform: state
entity_id:
- sensor.restmull
- sensor.papier
- sensor.schadstoffe
attribute: daysTo
to: 1
id: morgen
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- service: script.notify_engine
data:
title: '🗑️ Abfall 🗑️
'
value1: '{{ trigger.to_state.attributes.friendly_name }} wird {{ trigger.id
}} abgeholt.
'
who: home
tag_id: information
group: Abfall
mode: parallel
- alias: AbstellkammerLicht
id: 90cf54e2-7646-4a0d-b810-75d8e2360b4e
description: Schaltet das Licht nach an und aus.
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.abstellkammertursensor_contact
action:
- if:
- condition: state
entity_id: binary_sensor.abstellkammertursensor_contact
state: 'on'
then:
- service: light.turn_on
data: {}
target:
entity_id: light.abstellkammerlicht
else:
- service: light.turn_off
data: {}
target:
entity_id: light.abstellkammerlicht
- alias: AfterHaUpgrade
id: 7e2fd668-0ff5-4a40-859e-23a804c5c855
description: change version after HA upgrade
trigger:
- trigger: time
at: '23:55:00'
condition: []
action:
- service: shell_command.after_ha_upgrade
mode: single
- id: 8b97520c-c437-4b1d-afd5-192fc2413e7f
alias: armResidentsAway
description: Alarm automatisch anschalten wenn keiner daheim ist
trigger:
- platform: state
entity_id: group.residents
to: not_home
condition: []
action:
- service: alarm_control_panel.alarm_arm_away
data:
code: secret alarm_code
target:
entity_id: alarm_control_panel.alarmo
- id: '1690789658458'
alias: Android Auto Miguel
description: ''
trigger:
- trigger: state
entity_id:
- binary_sensor.pixel_9_pro_android_auto
to: 'on'
condition: []
action:
- action: notify.mobile_app_pixel_9_pro
data:
title: Connected 2 car
message: This device is connected to android auto.
data:
car_ui: true
notification_icon: mdi:car
channel: Auto
importance: high
mode: single
- id: '1691433091247'
alias: 'Roomba Behälter '
description: 'Roomba Behälter '
trigger:
- trigger: state
entity_id:
- binary_sensor.roomba_bin_full
to: 'on'
condition: []
action:
- action: notify.telegram_home_group
data:
title: 'Roomba '
message: Behälter ist voll. Bitte leeren l.
mode: single
- id: '1708473160035'
alias: 'Battery replacement '
description: ''
use_blueprint:
path: andrew-codechimp/battery_notes_battery_replaced.yaml
- id: '1728850959105'
alias: Reset Internet
description: Steckdose an und ausschalten damit die Verbindung neu aufgebaut wird.
triggers:
- trigger: state
entity_id:
- sensor.fritz_repeater_1200_ax_letzter_neustart
to: unavailable
conditions: []
actions:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.tabletsteckdose
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.tabletsteckdose
mode: single
- id: '1736551020218'
alias: SZ zu warm
description: ''
triggers:
- trigger: numeric_state
entity_id:
- sensor.schlafzimmertemperatur
above: 18
conditions:
- condition: sun
after: sunset
before: sunrise
before_offset: 01:00:00
actions:
- action: cover.open_cover
metadata: {}
data: {}
target:
area_id: schlafzimmer
mode: single
- id: '1736807752549'
alias: SZ zu kalt
description: ''
triggers:
- trigger: numeric_state
entity_id:
- sensor.schlafzimmertemperatur
below: 15
conditions:
- condition: sun
before: sunrise
before_offset: 01:00:00
after: sunset
actions:
- action: cover.set_cover_position
metadata: {}
data:
position: 50
target:
entity_id: cover.rollladen_schlafzimmer
mode: single
- description: Scheduled vacuum cleaner run
alias: Scheduled vacuum cleaner run
id: 146acdcd-843c-41d5-b727-b171a446a4d0
mode: single
trigger:
- platform: state
entity_id:
- schedule.staubsaug_zeiten
to: 'on'
condition:
- condition: state
entity_id: input_boolean.automatic_cleaning
state: 'on'
action:
- service: script.cleaning
data: {}
- alias: miloStatus
id: 9693cbfe-1590-403b-b110-10b6d5fa174b
description: Sync Milo State with silke state
trigger:
- platform: state
entity_id:
- person.silke
- person.miguel
condition:
- condition: template
value_template: '{% set personName = "person." ~ states("input_select.milo_person_sync")
%}
{{ trigger.entity_id == personName }}'
action:
- if:
- condition: template
value_template: '{% set personName = "person." ~ states("input_select.milo_person_sync")
%}
{{ states(personName) == "home" }}'
then:
- service: input_boolean.turn_on
entity_id: input_boolean.milo_home
else:
- service: input_boolean.turn_off
entity_id: input_boolean.milo_home
- service: device_tracker.see
data:
location_name: '{% set personName = "person." ~ states("input_select.milo_person_sync")
%}
{{ states(personName) }}'
dev_id: milo_dummy_tracker
gps:
- '{{ state_attr(''person.'' ~ states(''input_select.milo_person_sync''), ''latitude'')
}}'
- '{{ state_attr(''person.'' ~ states(''input_select.milo_person_sync''), ''longitude'')
}}'
gps_accuracy: '{% set personName = "person." ~ states("input_select.milo_person_sync")
%}
{{ state_attr(personName, "gps_accuracy") }}'
mode: queued
max: 10
- alias: weatherData
id: 5678264c-c308-4c30-865f-a9e6e64d4965
description: Antwortet auf den /wetter Befehl
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /wetter
condition: []
action:
- service: script.notify_engine
data:
value1: Wetter Bild
photo: '{{ states(''input_text.serverurl'') }}{{ state_attr(''image.ai_generated_weather_image'',
''entity_picture'') }}'
who: home
tag_id: information
group: Outdoor
mode: single
- alias: autoHeaterOff
id: 46d1add5-ee1d-4dbe-888a-a3054a247eaa
description: Heizung automatisch ausschalten, falls sie ausversehn angeschaltet
wird.
trigger:
- platform: state
entity_id:
- climate.room_climate_wohnzimmer
from: 'off'
condition:
- condition: numeric_state
entity_id: sensor.daikinap90134_outside_temperature
above: 18
action:
- service: climate.turn_off
target:
entity_id: climate.room_climate_wohnzimmer
data: {}
mode: single
- alias: parentsAway
id: 03a20f50-86fa-4a6f-915d-325ae9f3b36f
description: Automation when parents are away
trigger:
- platform: state
entity_id: group.parents
to: not_home
for:
hours: 0
minutes: 1
seconds: 0
condition: []
action:
- action: switch.turn_on
target:
entity_id: switch.kamera_steckdose_wz
mode: single
- alias: Show state of bed
id: 0a55979a-ca8c-4eef-8cb0-aade40ac6c1f
description: Show bed state on clock
trigger:
- platform: state
entity_id: binary_sensor.withings_in_bed_miguel
- platform: state
entity_id: binary_sensor.withings_in_bed_silke
condition: []
action:
- if:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.withings_in_bed_miguel
state: 'on'
- condition: state
entity_id: binary_sensor.withings_in_bed_silke
state: 'on'
then:
- action: script.awtrix3customapp
data:
app_id: bed
text: Zz Zz Zz Zz Zz Zz
icon: '19723'
else:
- action: script.awtrix3delapp
data:
app_id: bed
mode: single
- alias: BedAutomation
id: 6bb1782f-56aa-4ebc-b5ab-64e9f185f93f
description: Automatisierung, wenn jemand im Bett erkannt wurde oder alle aufgestanden
sind
trigger:
- platform: state
entity_id: binary_sensor.bett_tracker
for:
hours: 0
minutes: 5
seconds: 0
condition:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.bett_tracker
state: 'on'
- condition: state
entity_id: binary_sensor.bett_tracker
state: 'off'
action:
- if:
- condition: state
entity_id: binary_sensor.schlafenszeit
state: 'on'
alias: Prüfen ob gerade Schlafenszeit ist
then:
- if:
- condition: state
entity_id: binary_sensor.bett_tracker
state: 'on'
then:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.night_mode
data: {}
else:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.night_mode
data: {}
mode: single
- alias: benzinCommand
id: 1f17b5a2-16bd-4b6c-aab0-fce9174702d8
description: Antwortet auf den /benzin Befehl
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /benzin
condition: []
action:
- service: script.notify_engine
data:
title: '⛽ Benzinpreise ⛽
'
value1: '{% for fuel_station in statessensor.alle_benzinpreise.attributes.entity_id
%}
{{ state_attr(fuel_station, ''friendly_name'') }}: {{ states(fuel_station)
}}{{ state_attr(fuel_station, ''unit_of_measurement'') }} {% endfor %}'
who: home
tag_id: information
group: Outdoor
mode: single
- alias: Show birthdays on clock
id: 18139b1d-4666-4261-b024-e737cf1e9159
description: Show birthdays on clock
trigger:
- platform: time
at: 00:01:00
condition: []
action:
- variables:
triggered_entity: '{{ states | selectattr(''entity_id'', ''match'', ''sensor.anniversary_birthday_'')
| selectattr(''state'', ''eq'', ''0'') | map(attribute=''entity_id'') | list
| first }}'
- if:
- condition: template
value_template: '{{ triggered_entity != '''' }}'
then:
- action: script.awtrix3customapp
data:
app_id: birthday
text: '{{ state_attr(triggered_entity, ''friendly_name'') }}'
icon: '102'
else:
- action: script.awtrix3delapp
data:
app_id: birthday
mode: single
- alias: CalHotBev
id: a7e72c63-bbb1-4960-ac00-982d820e0853
description: Calculate amount of hot beverages made
trigger:
- platform: numeric_state
entity_id: sensor.kaffemaschine_power
above: 600
for: 00:00:10
condition:
- condition: state
entity_id: input_boolean.coffee_machine_is_washing
state: 'off'
- condition: state
entity_id: timer.kaffeemaschine_auto_aus
state: active
action:
- service: input_number.increment
target:
entity_id: input_number.heissgetranke_zahler
data:
amount: 1
- action: timer.cancel
data: {}
target:
entity_id: timer.kaffeemaschine_auto_aus
- action: timer.start
data: {}
target:
entity_id: timer.kaffeemaschine_auto_aus
mode: single
- alias: Calculate picnic price
id: 70e62f73-2464-477a-9525-d12e171c3cdd
description: Calc picnic price
trigger:
- platform: state
entity_id: sensor.picnic_status_der_letzten_bestellung
to: COMPLETED
condition: []
action:
- action: counter.set_value
target:
entity_id: counter.picnic_monats_kosten
data:
value: '{{ ( states(''counter.picnic_monats_kosten'') | float + states(''sensor.picnic_gesamtpreis_der_letzten_bestellung'')
| float ) | round(0) }}'
- action: counter.set_value
target:
entity_id: counter.picnic_jahres_kosten
data:
value: '{{ ( states(''counter.picnic_jahres_kosten'') | float + states(''sensor.picnic_gesamtpreis_der_letzten_bestellung'')
| float ) | round(0) }}'
mode: single
- alias: Terminerinnerung mit Fahrzeit
id: ccbc1585-d243-44f4-bdf0-ede4445fefb5
trigger:
- trigger: calendar
entity_id: calendar.familie
event: start
offset: -0:30:0
condition:
- condition: template
value_template: '{{ trigger.calendar_event.location != '''' }}'
action:
- variables:
start_time: '{{ trigger.calendar_event.start_time | as_timestamp | timestamp_custom(''%H:%M'',
True) }}'
- service: script.notify_engine
data:
title: '🗓️ Terminerinnerung - {{ trigger.calendar_event.summary }} 🗓️
'
value1: "Du hast einen Termin um {{ start_time }} Uhr\n \U0001F5FA Ort: {{\
\ trigger.calendar_event.location }}."
who: home
tag_id: information
group: Calendar
- alias: UhrFestnetz
id: 9369a9dc-88fb-4ee8-a724-94559678db81
description: Uhr Festnetz
trigger:
- platform: state
entity_id: sensor.fritz_box_7590_ax_anrufmonitor_telefonbuch
condition: []
action:
- variables:
from_state: "{% if trigger.from_state.attributes.from_name %}\n {{ trigger.from_state.attributes.from_name\
\ }}\n{% else %}\n {{ trigger.from_state.attributes.from }}\n{% endif %}"
to_state: "{% if trigger.to_state.attributes.from_name %}\n {{ trigger.to_state.attributes.from_name\
\ }}\n{% else %}\n {{ trigger.to_state.attributes.from }}\n{% endif %}"
- if:
- condition: template
value_template: '{{ trigger.to_state.state == ''ringing'' }}'
then:
- action: script.awtrix3notif
data:
text: '{{ to_state }}'
icon: '1232'
repeat: 2
- if:
- condition: or
conditions:
- condition: and
alias: Verpasst
conditions:
- condition: template
value_template: '{{ trigger.to_state.state == ''idle'' }}'
- condition: template
value_template: '{{ trigger.from_state.state == ''ringing'' }}'
- condition: and
alias: AB Weiterleitung
conditions:
- condition: template
value_template: '{{ trigger.to_state.state == ''talking'' }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.device == ''40'' }}'
then:
- action: script.awtrix3customapp
data:
app_id: phone
text: '{{ from_state }}'
icon: '21482'
duration: 15
else:
- action: script.awtrix3delapp
data:
app_id: phone
mode: single
- alias: Call mon var befüllen
id: 12afe90b-fefc-44f6-b46c-391fdde58f43
description: Set callmon var
trigger:
- platform: state
entity_id: sensor.fritz_box_7590_ax_anrufmonitor_telefonbuch
to: ringing
condition: []
action:
- service: var.update
data:
entity_id:
- var.callmon_name
- var.callmon_number
- var.callmon_time
- var.callmon_date
- service: input_text.set_value
target:
entity_id: input_text.callmon_lastcaller
data:
value: '{{ state_attr("sensor.fritz_box_7590_ax_anrufmonitor_telefonbuch", "from")}}
({{ state_attr("sensor.fritz_box_7590_ax_anrufmonitor_telefonbuch", "from_name")
}})'
mode: single
- alias: Festnetzbenachrichtigung
id: 2779b29f-8710-4a7b-adc8-03ec212b4ffb
description: Benachrichtigen bei verpassten anrufen
trigger:
- platform: state
entity_id: sensor.fritz_box_7590_ax_anrufmonitor_telefonbuch
from: ringing
condition: []
action:
- if:
- condition: template
value_template: '{{ trigger.to_state.state == ''idle'' }}'
then:
- service: script.notify_engine
data:
title: '📞 Verpasster Anruf 📞
'
value1: '{{ states.var.callmon_name.state }} ({{
states.var.callmon_number.state }}) hat am {{
states.var.callmon_date.state }} um {{ states.var.callmon_time.state
}} Uhr angerufen.
'
who: home
tag_id: information
group: Telephone
- if:
- condition: template
value_template: '{{ trigger.to_state.state == ''talking'' }}'
- condition: template
value_template: '{{ trigger.to_state.attributes.device == ''40'' }}'
then:
- service: script.notify_engine
data:
title: '📞 Verpasster Anruf - Weiterleitung AB 📞
'
value1: '{{ states.var.callmon_name.state }} ({{
states.var.callmon_number.state }}) hat am {{
states.var.callmon_date.state }} um {{ states.var.callmon_time.state
}} Uhr angerufen und wird jetzt auf den AB umgeleitet.
'
who: home
tag_id: information
group: Telephone
mode: single
- alias: camActiveLight
description: Light sync to webcam
id: 74cbcca6-c48d-4def-b2fe-7b5664a94701
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.bcwmc5cg4100cy0_kameraaktiv
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: schedule.buro_tage
state: 'off'
action:
- if:
- condition: state
entity_id: binary_sensor.bcwmc5cg4100cy0_kameraaktiv
state: 'on'
then:
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 100
target:
entity_id: light.schreibtischlicht
else:
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 30
- 255
- 0
flash: long
target:
entity_id: light.schreibtischlicht
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.schreibtischlicht
- alias: camCommand
id: 797ec8b1-3e74-4128-b62f-68070ec64749
description: Antwortet auf den /cam Befehl
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /cam
condition: []
action:
- service: script.send_cam_snaps
data: {}
mode: single
- alias: Check for flights
id: 814a77e9-f008-44df-ac4d-60a4068f2ce8
description: ''
trigger:
- platform: time_pattern
hours: /2
condition: []
action:
- action: script.check_cal4flights
data:
lookahead_hours: 3
mode: single
- alias: majaCheckHome
id: abc1c369-36b2-4084-9fc4-ce72e133ce5e
description: Check on maja when she's alone
trigger:
- platform: state
entity_id:
- person.silke
- person.miguel
condition:
- condition: state
entity_id: input_boolean.maja_home
state: 'on'
action:
- if:
- condition: state
entity_id: group.parents
state: home
- condition: not
conditions:
- condition: state
entity_id: timer.maja_check
state: idle
then:
- service: timer.cancel
data: {}
target:
entity_id: timer.maja_check
- if:
- condition: not
conditions:
- condition: state
entity_id: group.parents
state: home
- condition: not
conditions:
- condition: state
entity_id: group.guests
state: home
- condition: state
entity_id: timer.maja_check
state: idle
then:
- service: timer.start
data: {}
target:
entity_id: timer.maja_check
mode: single
- alias: Check if machine is washing
id: 0c239eff-b9be-4e90-a936-2e0144783bc9
description: Check if machine is washing
trigger:
- platform: numeric_state
entity_id: sensor.kaffemaschine_power
above: 600
for: 00:00:10
condition:
- condition: state
entity_id: timer.kaffeemaschine_auto_aus
state: idle
action:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.coffee_machine_is_washing
- action: timer.start
data: {}
target:
entity_id: timer.kaffeemaschine_auto_aus
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- action: input_boolean.turn_off
target:
entity_id: input_boolean.coffee_machine_is_washing
mode: single
- alias: ChoresNotif
id: 770ba890-cb06-4463-9447-161abd6e6195
description: Benachrichtigt, wenn Hausarbeiten anstehen.
trigger:
- platform: time
at: input_datetime.chores_notif_time
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- condition: state
entity_id: binary_sensor.grocy_overdue_chores
state: 'on'
action:
- service: script.notify_engine
data:
title: '🏠 Hausarbeiten fällig 🏠
'
value1: "{% set chores = state_attr(\"binary_sensor.grocy_overdue_chores\",\
\ \"overdue_chores\") %} Folgende Hausarbeiten stehen heute an oder sind überfällig:\
\ {{- '\\n' -}} {% for i in chores %} - {{ i.name }}\n \U0001F4DD {{ i.description\
\ }}\n \U0001F464 {{ i.next_execution_assigned_user.display_name }}\n \U0001F5D3\
{{ as_timestamp(i.next_estimated_execution_time) | timestamp_custom('%d.%m.%Y\
\ %H:%M') }}\n{% endfor %}"
who: home
tag_id: information
group: Hausarbeiten
mode: single
- alias: climateAutoOffTimer
id: a0db69d9-ec22-4abb-ab82-01ff9a12f95b
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.climate_auto_off
- platform: event
event_type: timer.cancelled
event_data:
entity_id: timer.climate_auto_off
condition: []
action:
- service: climate.turn_off
target:
entity_id: climate.daikinap90134
mode: single
- alias: climateAutoOnTimer
id: dac8ab87-b5ab-4795-9be4-b93df9aee932
description: ''
trigger:
- platform: event
event_type: timer.started
event_data:
entity_id: timer.climate_auto_off
condition: []
action:
- service: climate.turn_on
target:
entity_id:
- climate.daikinap90134
mode: single
- alias: MedisConsume
id: fa040eca-2d48-4243-a8c6-28b78d5b3f7c
description: Medi consume in Grocy
trigger:
- platform: state
entity_id: input_boolean.medis_miguel_heuschnupfen_graeser
to: 'on'
id: heuschnupfen
- platform: state
entity_id:
- input_boolean.medis_miguel_vitamind
- input_boolean.medis_silke_vitamind
to: 'on'
id: vitamin_d
action:
- variables:
product_id: ''
- alias: Typ von medi rausfinden
choose:
- conditions:
- condition: template
value_template: '{{ trigger.id == ''heuschnupfen'' }}'
sequence:
- variables:
product_id: '66'
- conditions:
- condition: template
value_template: '{{ trigger.id == ''vitamin_d'' }}'
sequence:
- variables:
product_id: '68'
- if:
- condition: template
value_template: '{{ product_id != '''' }}'
then:
- action: grocy.consume_product_from_stock
data:
allow_subproduct_substitution: true
transaction_type: CONSUME
product_id: '{{ product_id }}'
amount: 1
spoiled: false
mode: queued
max: 5
- alias: CommitCustomComponents
id: 0be8fbce-80d5-4288-8531-b384258445d6
description: Automatischer commit der neusten HACS updates
trigger:
- trigger: time
at: '23:55:00'
condition: []
action:
- service: shell_command.auto_commit_cc
mode: single
- alias: DailyResets
id: 041e11a9-6487-4743-b846-3c340834a87f
description: Daily reset
trigger:
platform: time
at: 00:00:00
action:
- action: input_number.set_value
target:
entity_id: input_number.heissgetranke_zahler
data:
value: 0
- alias: SleepModeDeactivate
id: 0fc692c0-c6e5-4bef-8370-fabb12dcdf5d
description: Schaltet den Schlafmodus automatisch aus, wenn keine Schlafenszeit
ist
trigger:
- platform: state
entity_id: binary_sensor.schlafenszeit
to: 'off'
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.night_mode
mode: single
- alias: DishwasherNotif
id: 58eb700c-0b2b-4a8b-9cfe-80a1a224f32a
description: Benachrichtigt wenn die Spülmaschine fertig ist
trigger:
- platform: state
entity_id:
- input_boolean.spulmaschine_aktiv
to: 'off'
action:
- service: script.notify_engine
data:
title: '🍴🫧 Spülmaschine 🍴🫧
'
value1: Spülmaschine ist fertig und kann ausgeräumt werden.
who: home
tag_id: information
group: Dishes
- service: input_boolean.turn_off
entity_id: input_boolean.dishwasher_ready
- action: grocy.execute_chore
data:
chore_id: '7'
done_by: '1'
mode: single
- alias: Show doors open
id: abde5a7b-b2a6-49e5-9a90-9ed21c9978b1
description: Show doors open
trigger:
- platform: state
entity_id: number.count_doors_open
action:
- if:
- condition: numeric_state
entity_id: number.count_doors_open
below: 1
then:
- action: script.awtrix3delapp
data:
app_id: doors
else:
- action: script.awtrix3customapp
data:
app_id: doors
text: '{{ states(''number.count_doors_open'') | int }}'
icon: '9766'
mode: single
- alias: DryerActive
id: ee292445-9310-491a-bfde-075737bd1b8e
description: Setzt den Helfer, wenn der Trockner läuft.
trigger:
- platform: numeric_state
entity_id: sensor.trockner_steckdose_power
above: '15'
for: 00:01:00
condition:
- condition: state
entity_id: input_boolean.dryer_active
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.dryer_active
- service: input_number.set_value
data_template:
value: '{{ states(''sensor.trockner_steckdose_energy'') }}'
entity_id: input_number.dryer_cycle_consumption
mode: single
- alias: DryerNotif
id: 45b44c95-9e9f-42d9-bc0e-369ab3a74bb9
description: Benachrichtigt wenn der Trockner fertig ist
trigger:
- platform: numeric_state
entity_id: sensor.trockner_steckdose_power
below: '1.0'
for: 00:01:00
condition:
- condition: state
entity_id: input_boolean.dryer_active
state: 'on'
action:
- service: script.notify_engine
data:
title: '♨️ Trockner ♨️
'
value1: '{% set cycleConsumption = ( states("sensor.trockner_steckdose_energy")
| float - states("input_number.dryer_cycle_consumption") | float ) %} {%
set costs = cycleConsumption * states("input_number.strompreis") | float(2)
%} Trockner ist fertig. Verbrauch {{ cycleConsumption | float|round(2) }}
kWh. Das macht ca. {{ costs | float|round(2) }} €'
who: home
tag_id: information
group: Laundry
- service: input_boolean.turn_off
entity_id: input_boolean.dryer_active
mode: single
- alias: DummyHomeStates
id: ed8f19ea-d76e-4212-b760-0893e929d23a
description: Dummy Home state trackers
trigger:
- platform: state
entity_id:
- input_boolean.maja_home
- input_boolean.milo_home
action:
- service: script.dummy_tracker_states
data: {}
mode: single
- alias: Dusk
id: 36b28e7a-7fdf-4e04-b275-09f577a36913
description: Abenddämmerungsautomation
trigger:
- platform: time
at: sensor.sun_next_dusk
condition: []
action:
- if:
- condition: or
conditions:
- condition: state
entity_id: sensor.season
state: autumn
- condition: state
entity_id: sensor.season
state: winter
then:
- action: switch.turn_on
target:
entity_id: switch.lichterkette
mode: single
- alias: Show dwd warning on clock
id: 6ce30133-5f41-456c-a80f-111fbe92bd0c
description: Show dwd warning on clock
trigger:
- platform: state
entity_id: sensor.home_aktuelle_warnstufe
condition: []
action:
- variables:
warn_count: '{{ state_attr(''sensor.home_aktuelle_warnstufe'', ''warning_count'')
| int(0) }}'
- repeat:
for_each: '{{ range(1, warn_count + 1) | list }}'
sequence:
- service: script.awtrix3customapp
data:
app_id: dwd_{{ repeat.item }}
text: '{{ state_attr(''sensor.home_aktuelle_warnstufe'', ''warning_'' ~
repeat.item ~ ''_name'') }}'
icon: '6874'
- variables:
max_possible: 3
- repeat:
for_each: '{{ range(warn_count + 1, max_possible + 1) | list }}'
sequence:
- service: script.awtrix3delapp
data:
app_id: dwd_{{ repeat.item }}
mode: single
- alias: Wetterwarnung start/change
id: 00c0aae8-8fa7-44bc-9611-676dbe4869b7
description: DWD Wetterwarnungen
trigger:
- platform: state
entity_id:
- sensor.home_aktuelle_warnstufe
- sensor.home_vorwarnstufe
attribute: warning_count
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- '{{ trigger.from_state.state != unavailable }}'
- '{{ trigger.to_state.attributes.warning_count != trigger.from_state.attributes.warning_count
}}'
action:
- variables:
current: sensor.home_aktuelle_warnstufe
advance: sensor.home_vorwarnstufe
current_count: '{{ state_attr(current, ''warning_count'') }}'
advance_count: '{{ state_attr(advance, ''warning_count'') }}'
region_name: '{{ state_attr(current, ''region_name'') if ''current'' in trigger.entity_id
else state_attr(advance, ''region_name'') }}'
title: "{% if current_count in [0, none] and advance_count in [0, none] %}\n\
\ Entwarnung für {{ trigger.to_state.attributes.friendly_name }}\n{% else\
\ %}\n {{ region_name }}: WETTERWARNUNG ({{ current_count + advance_count\
\ }})\n{% endif %}"
weekdays:
- Montag
- Dienstag
- Mittwoch
- Donnerstag
- Freitag
- Samstag
- Sonntag
format_warning: "{% macro format_warning(warning_source, index) %}\n {% set\
\ headline = state_attr(warning_source, 'warning_' ~ index ~ '_headline')\
\ %}\n {% set description = state_attr(warning_source, 'warning_' ~ index\
\ ~ '_description') %}\n {% set instruction = state_attr(warning_source,\
\ 'warning_' ~ index ~ '_instruction') %}\n {% set time_start = (state_attr(warning_source,\
\ 'warning_' ~ index ~ '_start')|as_timestamp(now()) )|timestamp_custom('%d.%m.%Y,\
\ %R', true, 'N/A') %}\n {% set time_end = (state_attr(warning_source, 'warning_'\
\ ~ index ~ '_end')|as_timestamp(now()) )|timestamp_custom('%d.%m.%Y, %R',\
\ true, 'N/A') %}\n {% set weekday_start = (state_attr(warning_source, 'warning_'\
\ ~ index ~ '_start')|as_timestamp(now().timestamp()) )|timestamp_custom('%w',\
\ true, now().weekday() )|int %}\n {% set weekday_end = (state_attr(warning_source,\
\ 'warning_' ~ index ~ '_end')|as_timestamp(now().timestamp()) )|timestamp_custom('%w',\
\ true, now().weekday() )|int %}\n {% set last_update = (state_attr(warning_source,\
\ 'last_update')|as_timestamp(now()) )|timestamp_custom('%d.%m.%Y, %R', true,\
\ 'N/A') %}\n *{{ headline }}*\n ⏰ _{{ weekdays[weekday_start-1] ~ ', '\
\ ~ time_start ~ ' - ' ~ weekdays[weekday_end-1] ~ ', ' ~ time_end }}_\n\n\
\ {{ description|trim }}\n {% if instruction != none %}\n *Handlungsempfehlung:*\n\
\ {{ instruction|trim }}\n {% endif %}\n Letzte Aktualisierung: {{ last_update\
\ }}\n{% endmacro %}"
message: "{% if current_count in [0, none] and advance_count in [0, none] %}\n\
\ Die Wetterlage hat sich wieder normalisiert.\n{% else %}\n {% for i in\
\ range(current_count) %}\n {{ format_warning(current, loop.index) }}\n\
\ {% if not loop.last %}*** ***{% endif %}\n {% endfor %}\n {% if current_count\
\ not in [0, none] and advance_count not in [0, none] %}*** ***{% endif %}\n\
\ {% for i in range(advance_count) %}\n {{ format_warning(advance, loop.index)\
\ }}\n {% if not loop.last %}*** ***{% endif %}\n {% endfor %}\n{% endif\
\ %}"
- service: script.notify_engine
data:
title: '{{ title }}'
value1: '{{ message }}'
tag_id: information
group: Wetter
photo: https://www.dwd.de/DWD/warnungen/warnstatus/SchilderSU.jpg
mode: parallel
- alias: GrocyNotifExpired
id: ba321099-add9-41a4-bc53-0699f29977e6
description: Benachrichtigt, wenn Produkte ablaufen sind
trigger:
- platform: state
entity_id: binary_sensor.grocy_expired_products
attribute: count
condition:
- condition: state
entity_id: binary_sensor.grocy_expired_products
state: 'on'
action:
- service: script.notify_engine
data:
title: '🥫☠️ Produkte sind abgelaufen 🍲☠️
'
value1: '{% set expiredProducts = state_attr("binary_sensor.grocy_expired_products",
"expired_products")%} {% set expiredCount = state_attr("binary_sensor.grocy_expired_products",
"count")%}
Folgende {{ expiredCount }} Produkte sind abgelaufen: {{- ''\n'' -}} {% for
i in expiredProducts %} - {{ i.name }} {{ as_timestamp(i.best_before_date)
| timestamp_custom(''%d.%m.%Y'') }} {{- ''\n'' -}} {% endfor %}'
who: home
tag_id: information
group: Food
mode: single
- alias: GrocyNotifExpiring
id: eb62c777-22eb-4bd7-bffe-8f705cd7f4c8
description: Benachrichtigt, wenn Produkte bald ablaufen
trigger:
- platform: state
entity_id: binary_sensor.grocy_expiring_products
attribute: count
condition:
- condition: state
entity_id: binary_sensor.grocy_expiring_products
state: 'on'
action:
- service: script.notify_engine
data:
title: '🥫 Produkte laufen bald ab 🍲
'
value1: '{% set expiringProducts = state_attr("binary_sensor.grocy_expiring_products",
"expiring_products")%} {% set expiringCount = state_attr("binary_sensor.grocy_expiring_products",
"count")%}
Es laufen folgende {{expiringCount}} Produkte bald ab: {{- ''\n'' -}} {% for
i in expiringProducts %} - {{ i.name }} {{ as_timestamp(i.best_before_date)
| timestamp_custom(''%d.%m.%Y'') }} {{- ''\n'' -}} {% endfor %}'
who: home
tag_id: information
group: Food
mode: single
- alias: Flights above home
id: 0d54b339-fb39-44f2-8675-cd24ccf2f17c
description: Flights above home
trigger:
- platform: event
event_type: flightradar24_entry
condition:
- condition: state
entity_id: group.parents
state: home
action:
- action: script.awtrix3notif
data:
text: '{{ trigger.event.data.airport_origin_city }} -> {{ trigger.event.data.airport_destination_city
}}'
icon: '8879'
repeat: 2
mode: single
- alias: majaGassiTimes
id: 8767ef86-9e59-4813-bd4d-9a293a9738a3
description: Maja Gassi times
trigger:
- platform: state
entity_id: schedule.maja_gassi_zeiten
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- if:
- condition: state
entity_id: schedule.maja_gassi_zeiten
state: 'on'
then:
- if:
- condition: state
entity_id: person.miguel
state: home
then:
- service: input_select.select_option
target:
entity_id: input_select.maja_person_sync
data:
option: miguel
else:
- service: input_select.select_option
target:
entity_id: input_select.maja_person_sync
data:
option: silke
else:
- service: input_select.select_option
target:
entity_id: input_select.maja_person_sync
data:
option: alleine
mode: single
- alias: TVProgEvening
id: 9eceacec-30fe-415a-81c0-50e54b00b6e4
description: Benachrichtigt über das TV Programm um 20:15
trigger:
- platform: time
at: '20:05:00'
condition:
- condition: state
entity_id: group.residents
state: home
action:
- service: button.press
data: {}
target:
entity_id: button.tv_prog_2015_refresh_button
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- service: script.notify_engine
data:
title: '📺 TV Programm heut abend 📺
'
value1: "{% set tvProg = states.sensor.tv_prog_2015.attributes %} {% for i in\
\ tvProg %} {% if not((i == \"icon\" or i == \"friendly_name\"))%}\n - {{\
\ state_attr('sensor.tv_prog_2015',i) }} ({{ i }})\n{% endif %} {% endfor\
\ %}"
who: home
tag_id: information
group: TV
mode: single
- alias: getWorkRestHTML
id: 91949311-550e-466b-abf0-996d26e324f9
description: Get work restaurant html page
trigger:
- trigger: time
at: '20:00:00'
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- action: shell_command.browserless_scraper
data:
function: work_restaurant.js
output: work_restaurant.html
- delay: 0:00:45
- action: multiscrape.trigger_work_meals
mode: single
- id: this_is_halloween
alias: This is Halloween
initial_state: true
trigger:
- platform: time
at: input_datetime.halloween_show
action:
- service: input_boolean.turn_on
entity_id: input_boolean.this_is_halloween
- delay: 01:00:00
- service: input_boolean.turn_off
entity_id: input_boolean.this_is_halloween
- id: operation haunted house
alias: Operation Haunted House
trigger:
- platform: state
entity_id: input_boolean.this_is_halloween
to: 'on'
from: 'off'
id: start
- platform: state
entity_id: input_boolean.this_is_halloween
id: stop
from: 'on'
to: 'off'
action:
- choose:
- conditions:
- condition: trigger
id: start
sequence:
- service: script.turn_on
target:
entity_id: script.haunted_house
- conditions:
- condition: trigger
id: stop
sequence:
- service: script.turn_off
target:
entity_id: script.haunted_house
- service: scene.turn_on
target:
entity_id: scene.before_haunting
default: []
initial_state: true
mode: single
- id: 9f575814-8f98-411a-93a9-1b51bcd4cded
alias: Home-Assistant Neugestartet
initial_state: true
trigger:
- platform: homeassistant
event: start
action:
- service: script.dummy_tracker_states
data: {}
- service: script.notify_engine
data:
title: Home Assistant
value1: Server wurde neugestartet
who: miguel
tag_id: information
group: System
- alias: Show holiday countdown on clock
id: 82d9f15e-5dae-4708-997f-6bae2bc337ee
description: Show holiday countdown on clock
trigger:
- platform: time
at: 00:01:00
condition: []
action:
- variables:
triggered_entity: "{{ states\n | selectattr('entity_id', 'match', 'sensor.anniversary_urlaub_')\n\
\ | selectattr('state', 'is_number')\n | selectattr('state', 'defined')\n\
\ | selectattr('state', 'gt', '0')\n | map(attribute='entity_id')\n | list\n\
\ | first\n}}"
entity_name: '{{ state_attr(triggered_entity, ''friendly_name'') }}'
- if:
- condition: template
value_template: '{{ triggered_entity != '''' }}'
then:
- action: script.awtrix3customapp
data:
app_id: holiday_{{ entity_name }}
text: '{{ states(triggered_entity) }} {{ state_attr(triggered_entity, ''unit_of_measurement'')}}
- {{ entity_name }}'
icon: '15644'
else:
- action: script.awtrix3delapp
data:
app_id: holiday_{{ entity_name }}
mode: single
- alias: UrlaubsmodusAutom
id: 7c88607a-9f86-45aa-852c-601e2c76385e
description: Schaltet das Smart Home System in den Urlaubsmodus.
trigger:
- platform: state
entity_id: input_boolean.holiday_mode
condition: []
action:
- if:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'on'
then:
- service: script.notify_engine
data:
title: 'Urlaubsmodus eingeschaltet
'
value1: 🌴
who: home
tag_id: information
group: Urlaub
- service: light.turn_off
data: {}
target:
entity_id: light.kameralichter
else:
- service: script.notify_engine
data:
title: 'Urlaubsmodus ausgeschaltet
'
value1: 🌴
who: home
tag_id: information
group: Urlaub
- service: light.turn_on
data: {}
target:
entity_id: light.kameralichter
mode: single
- alias: UrlaubsModus
id: 5899d18e-e2f3-4575-be82-4d81effc7293
description: Schaltet das Smart Home System in den Urlaubsmodus.
trigger:
- platform: state
entity_id: input_boolean.holiday_mode
condition: []
action:
- if:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'on'
then:
- action: script.notify_engine
data:
title: 'Urlaubsmodus eingeschaltet
'
value1: 🌴
who: home
tag_id: information
group: Urlaub
- action: light.turn_off
data: {}
target:
entity_id: light.kameralichter
- action: script.awtrix3delapp
data:
app_id: mini
- action: script.awtrix3delapp
data:
app_id: miguel
- action: script.awtrix3delapp
data:
app_id: silke
- action: script.awtrix3delapp
data:
app_id: milo
else:
- action: script.notify_engine
data:
title: 'Urlaubsmodus ausgeschaltet
'
value1: 🌴
who: home
tag_id: information
group: Urlaub
- action: light.turn_on
data: {}
target:
entity_id: light.kameralichter
mode: single
- alias: parentsHome
id: 9fad1c85-4e6d-4864-91ee-54b0fc12c725
description: Parents are at home again
trigger:
- platform: state
entity_id: group.parents
to: home
for:
hours: 0
minutes: 1
seconds: 0
condition: []
action:
- action: alarm_control_panel.alarm_disarm
data:
code: secret alarm_code
target:
entity_id: alarm_control_panel.alarmo
- action: switch.turn_off
target:
entity_id: switch.kamera_steckdose_wz
mode: single
- alias: HospitalNotif
id: daecbf74-77b8-4a46-b70c-0b4e38ee73c6
description: Benachrichtigt wenn jemand im Krankenhaus ist.
trigger:
- platform: state
entity_id: zone.slk_klinik
from: '0'
for:
hours: 0
minutes: 5
seconds: 0
- platform: state
entity_id: zone.grk_klinik_sinsheim
from: '0'
for:
hours: 0
minutes: 5
seconds: 0
condition: []
action:
- service: script.notify_engine
data:
title: '🚑🏥 Krankenhaus 🏥🚑
'
value1: '{% set persons = state_attr(trigger.entity_id, ''persons'') %} Achtung!
{% for i in persons %} - {{ state_attr(i,''friendly_name'') }} {% endfor %}
ist/sind seit 5min in folgendem Krankenhaus: {{ trigger.to_state.attributes.friendly_name
}}.'
who: home
tag_id: alert
group: Notfall
mode: single
- alias: Show daily hot beverages
id: c8718743-1084-41e6-a047-3483fe692c8b
description: Show daily hot beverages
trigger:
- platform: state
entity_id: input_number.heissgetranke_zahler
condition: []
action:
- if:
- condition: template
value_template: '{{ states(''input_number.heissgetranke_zahler'') | int == 0
}}'
then:
- action: script.awtrix3delapp
data:
app_id: coffee
else:
- action: script.awtrix3customapp
data:
app_id: coffee
text: '{{ states(''input_number.heissgetranke_zahler'') | int }}'
icon: '14060'
mode: single
- alias: Show humidity on clock
id: e90f58ed-9d21-499f-aa84-81a9e2523643
description: ' Show humidity on clock'
trigger:
- platform: state
entity_id: sensor.wohnungsfeuchtigkeit
condition: []
action:
- action: script.awtrix3customapp
data:
app_id: humidity
text: '{{ states(''sensor.wohnungsfeuchtigkeit'') }} {{ state_attr(''sensor.wohnungsfeuchtigkeit'',
''unit_of_measurement'') }}'
icon: '2423'
mode: single
- alias: Kinderzimmerlicht Auto an
id: aa5b46dc-164e-4d52-9d53-4f078c7dd107
description: ''
trigger:
- platform: event
event_type: timer.started
event_data:
entity_id: timer.children_light_on
condition:
- condition: state
entity_id: input_boolean.automatic_lights
state: 'on'
action:
- service: light.turn_on
target:
entity_id: light.kinderzimmerlicht
mode: single
- alias: 'Kinderzimmerlicht ohne Bewegung '
id: ab25af73-cf63-4538-9b78-a7f01e100066
description: Kinderzimmer aus wenn keine Bewegung
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.children_light_on
condition: []
action:
- service: light.turn_off
data: {}
target:
entity_id: light.kinderzimmerlicht
mode: single
- alias: Kinderzimmer bewegung erkannt
id: b3ad247c-d77b-437c-8cba-8c3fdb7b99d9
description: ''
trigger:
- platform: state
entity_id: binary_sensor.kinderzimmerbewegungssensor_occupancy
to: 'on'
condition:
- condition: time
after: '17:00:00'
before: 09:00:00
- condition: or
conditions:
- condition: state
entity_id: cover.rolladen_kinderzimmer
state: closed
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- if:
- condition: state
entity_id: timer.children_light_on
state: idle
then:
- service: timer.start
target:
entity_id: timer.children_light_on
else:
- service: timer.change
data:
duration: 00:05:00
target:
entity_id: timer.children_light_on
alias: Add 5min to timer
mode: single
- alias: LeavingWork
id: 8cf24a78-fe6c-452c-8845-eb16ddad0b10
description: Benachrichtigt wenn ich die Arbeit verlasse.
trigger:
- platform: state
entity_id:
- zone.work_miguel
to: '0'
for:
hours: 0
minutes: 3
seconds: 0
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- service: script.notify_engine
data:
title: '🚗 Miguel ist unterwegs heim 🚗
'
value1: 'Miguel hat gerade das Geschäft verlassen und kommt vermutlich bald
heim.
Geschätzte Zeit: {{ states(''sensor.miguel_eta_home'') }} {{ state_attr(''sensor.miguel_eta_home'',
''unit_of_measurement'') }}.
'
who: home
tag_id: information
group: Moving
mode: single
- alias: Show lightstrip time
id: 5f7b6ea8-5d4b-4bf8-80d0-cd976f9ea7d5
description: Show lightstrip time
trigger:
- platform: time_pattern
minutes: /5
condition: []
action:
- if:
- condition: state
entity_id: timer.lichterkette
state: idle
then:
- action: script.awtrix3delapp
data:
app_id: lightstrip
else:
- action: script.awtrix3customapp
data:
app_id: lightstrip
text: Lichterkette
icon: '66625'
progress: '{{ ( 100 - max(0, ((state_attr(''timer.lichterkette'', ''finishes_at'')
| as_datetime - now().replace(microsecond=0)).total_seconds() / 25200) *
100) ) | round(2) }}'
mode: single
- alias: LichterkettenTimer
id: c63598d6-82f5-4be9-b300-1ddfa28ef650
description: Lichterketten timer
mode: single
trigger:
- platform: state
entity_id:
- switch.lichterkette
action:
- if:
- condition: state
entity_id: switch.lichterkette
state: 'on'
then:
- service: timer.start
data: {}
target:
entity_id: timer.lichterkette
else:
- service: timer.finish
data: {}
target:
entity_id: timer.lichterkette
- alias: Lichterkette
id: 20b69e8d-fc7f-4cbc-a49c-c750b72e8983
description: Schaltet die Lichterkette aus
mode: single
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.lichterkette
action:
- service: switch.turn_off
data: {}
target:
entity_id: switch.lichterkette
- alias: LightningTVCounter
id: e26e4603-0144-4492-abac-7a15f9355c40
trigger:
- platform: state
entity_id:
- sensor.kohgeb_family_home_lightning_counter
condition:
- condition: not
conditions:
- condition: state
entity_id: sensor.kohgeb_family_home_lightning_counter
state: '0'
action:
- service: notify.tvoverlaynotifyfixed
data:
data:
id: fixed_lightning
icon: mdi:weather-lightning-rainy
expiration: 15m
shape: rounded
message: '{{ states(''sensor.kohgeb_family_home_lightning_counter'') | round
}} {{ state_attr(''sensor.kohgeb_family_home_lightning_counter'', ''unit_of_measurement'')
}}'
mode: single
- alias: Show lightning strikes on clock
id: 6640ee8e-ea3d-4b86-be28-ab8702d5f96c
description: Show lightning strikes on clock
trigger:
- platform: state
entity_id: sensor.kohgeb_family_home_lightning_counter
condition: []
action:
- variables:
lightning_counter: '{{ states(''sensor.kohgeb_family_home_lightning_counter'')
| int(0) }}'
lightning_distance: '{{ states(''sensor.kohgeb_family_home_lightning_distance'')
| int(0) }}'
- if:
- condition: state
entity_id: sensor.kohgeb_family_home_lightning_counter
state: '0'
then:
- service: script.awtrix3delapp
data:
app_id: lightning
else:
- service: script.awtrix3customapp
data:
app_id: lightning
text: '{{ lightning_counter }} - {{ lightning_distance }} km'
icon: '33475'
mode: single
- alias: Show lights on
id: 05cac6cf-e6a1-45b4-88f0-28374ae45913
description: Show lights on
trigger:
- platform: state
entity_id: number.count_lights_on
condition: []
action:
- if:
- condition: numeric_state
entity_id: number.count_lights_on
below: 1
then:
- action: script.awtrix3delapp
data:
app_id: lights
else:
- action: script.awtrix3customapp
data:
app_id: lights
text: '{{ states(''number.count_lights_on'') | int }}'
icon: '1762'
mode: single
- alias: LLMVisionCameraHN
description: ''
id: 7301525b-8f3b-411e-a473-da8c5a4afc57
triggers:
- trigger: time_pattern
minutes: /5
conditions: []
actions:
- action: script.stream_analyzer
data:
camera:
- camera.rathaus
mode: single
- alias: LongShowering
id: decf9977-3103-406d-8a04-65334807751c
description: Notify if someone is showering too long
trigger:
- platform: state
entity_id:
- binary_sensor.dusche
from: 'on'
for:
hours: 0
minutes: 13
seconds: 0
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- service: notify.alexa_media_echo_gross
data:
message: Genug geduscht! Es sind jetzt immerhin schon 13 Minuten!!!
data:
type: tts
- service: script.notify_engine
data:
title: Dusche
value1: Genug geduscht! Es sind jetzt immerhin schon 13 Minuten!!!
who: home
tag_id: information
group: Cleaning
mode: single
- alias: majaFotoCheck
id: bf7beb70-eb04-4272-80b7-1e032acbea61
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.maja_check
condition: []
action:
- service: script.send_cam_snaps
data: {}
mode: single
- alias: majaTelegramStatus
id: 9af053f5-0dfb-4adf-8b36-a2747f2caaae
description: Maja state from telegram
trigger:
- platform: event
id: home
event_type: telegram_callback
event_data:
data: /maja_home
- platform: event
id: gone
event_type: telegram_callback
event_data:
data: /maja_gone
condition: []
action:
- if:
- condition: trigger
id: home
then:
- service: input_boolean.turn_on
entity_id: input_boolean.maja_home
else:
- service: input_boolean.turn_off
entity_id: input_boolean.maja_home
- service: telegram_bot.answer_callback_query
data_template:
callback_query_id: '{{ trigger.event.data.id }}'
message: Alles klar danke!
- service: telegram_bot.edit_replymarkup
data_template:
message_id: '{{ trigger.event.data.message.message_id }}'
chat_id: '{{ trigger.event.data.chat_id }}'
inline_keyboard: []
mode: single
- alias: workMeals
id: a601d3fe-17d3-4cff-9eb1-ea4bbca2c549
description: Notify about the work meals
trigger:
- trigger: time
at: '11:00:00'
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: schedule.buro_tage
state: 'on'
- condition: not
conditions:
- condition: state
entity_id: person.miguel
state: home
action:
- action: script.notify_engine
data:
title: '🍴 Heutiges Essen im Geschäft 🍽️
'
value1: 'Heute im Geschäft gibt es folgende Gerichte:
'
who: home
tag_id: information
group: Work
photos:
- file: /config/www/downloaded/work_meals/one.png
caption: '{{ states(''sensor.work_meal_one'') }}'
- file: /config/www/downloaded/work_meals/one_two.png
caption: '{{ states(''sensor.work_meal_one_two'') }}'
- file: /config/www/downloaded/work_meals/three.png
caption: '{{ states(''sensor.work_meal_three'') }}'
- file: /config/www/downloaded/work_meals/four.png
caption: '{{ states(''sensor.work_meal_four'') }}'
- file: /config/www/downloaded/work_meals/five.png
caption: '{{ states(''sensor.work_meal_five'') }}'
mode: single
- alias: MealImg
description: ''
id: ffe67e29-366b-4661-a0b0-bfea95d4468e
triggers:
- trigger: state
entity_id: sensor.work_meal_one
id: one
- trigger: state
entity_id: sensor.work_meal_one_two
id: one_two
- trigger: state
entity_id: sensor.work_meal_three
id: three
- trigger: state
entity_id: sensor.work_meal_four
id: four
- trigger: state
entity_id: sensor.work_meal_five
id: five
- trigger: state
entity_id: input_text.milo_kita_essen_mittwoch
id: mittwoch
- trigger: state
entity_id: input_text.milo_kita_essen_donnerstag
id: donnerstag
- trigger: state
entity_id: input_text.milo_kita_essen_freitag
id: freitag
conditions:
- condition: template
value_template: '{{ states(trigger.entity_id) != ''unavailable'' }}'
actions:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.id in [''one'', ''one_two'', ''three'', ''four'',
''five''] }}'
sequence:
- variables:
directory: work_meals
- conditions:
- condition: template
value_template: '{{ trigger.id in [''mittwoch'', ''donnerstag'', ''freitag'']
}}'
sequence:
- variables:
directory: kita_meals
default:
- variables:
directory: meals
- action: openai_conversation.generate_image
data:
size: 1024x1024
quality: standard
style: vivid
config_entry: 01JAE4ZR2CG7T0XTAV08YDB7SS
prompt: 'Generiere ein realistisches Bild von folgendem Essen: {{ states(trigger.entity_id)
}} Der Fokus sollte auf dem Essen sein.'
response_variable: meal
- action: downloader.download_file
data:
overwrite: true
url: '{{ meal.url }}'
filename: '{{ trigger.id }}.png'
subdir: '{{ directory }}'
mode: parallel
- alias: MeteoAlarm
id: 40db0999-dd04-4b40-b5d3-58684fc9895f
description: Meteo Alarm
trigger:
- platform: state
entity_id: binary_sensor.meteoalarm
to: 'on'
condition:
- condition: state
entity_id: binary_sensor.jemand_in_spanien
state: 'on'
action:
- action: script.notify_engine
data:
title: 🌩️ {{state_attr('binary_sensor.meteoalarm', 'headline')}} 🌩️
value1: "\U0001F570 {{ state_attr('binary_sensor.meteoalarm', 'effective')|as_timestamp|timestamp_custom('%d.%m.%Y\
\ %H:%M:%S %Z') }} - {{ state_attr('binary_sensor.meteoalarm', 'expires')|as_timestamp|timestamp_custom('%d.%m.%Y\
\ %H:%M:%S %Z') }}\n{{state_attr('binary_sensor.meteoalarm', 'description')}}\n\
**Handlungsempfehlung:**\n {{state_attr('binary_sensor.meteoalarm', 'instruction')}}\n\
\n**Gesendet von:**\n {{state_attr('binary_sensor.meteoalarm', 'senderName')}}"
who: family
tag_id: information
- alias: MiloKita
id: b2aeeef6-6e1f-441d-a1b4-1b678cd97467
description: Status aktualisieren, wenn Milo in der Kita ist.
trigger:
- platform: state
entity_id: schedule.milo_kita_zeiten
condition:
- condition: state
entity_id: binary_sensor.milo_kita
state: 'on'
action:
- if:
- condition: state
entity_id: schedule.milo_kita_zeiten
state: 'on'
then:
- action: input_select.select_option
target:
entity_id: input_select.milo_person_sync
data:
option: alleine
- action: device_tracker.see
data:
dev_id: milo_dummy_tracker
gps:
- secret milo_kita_lat
- secret milo_kita_long
else:
- action: input_select.select_option
target:
entity_id: input_select.milo_person_sync
data:
option: silke
mode: single
- alias: Show mini countdown on clock
id: 5ce560a2-c147-40f0-b02f-46ba328c5b84
description: Show mini countdown on clock
trigger:
- platform: time
at: 00:01:00
condition:
- condition: state
entity_id: group.parents
state: home
action:
- variables:
triggered_entity: sensor.anniversary_special_b_mini
entity_name: '{{ state_attr(triggered_entity, ''friendly_name'') }}'
- if:
- condition: template
value_template: '{{ triggered_entity != '''' }}'
then:
- action: script.awtrix3customapp
data:
app_id: mini
text: '{{ states(triggered_entity) }} {{ state_attr(triggered_entity, ''unit_of_measurement'')}}'
icon: '365'
else:
- action: script.awtrix3delapp
data:
app_id: mini
mode: single
- alias: GrocyMissingProds
id: 18dc0537-cfe1-49c3-badc-0526216e7909
description: Benachrichtigt, wenn Produkte fehlen
trigger:
- platform: state
entity_id: binary_sensor.grocy_missing_products
attribute: count
condition:
- condition: state
entity_id: binary_sensor.grocy_missing_products
state: 'on'
action:
- service: script.notify_engine
data:
title: '🥫 Produkte fehlen 🍲
'
value1: '{% set expiringProducts = state_attr("binary_sensor.grocy_missing_products",
"missing_products")%} {% set expiringCount = state_attr("binary_sensor.grocy_missing_products",
"count")%}
Folgende {{expiringCount}} Produkte müssen gekauft werden: {{- ''\n'' -}}
{% for i in expiringProducts %} - {{ i.name }} {{- ''\n'' -}} {% endfor %}'
who: home
tag_id: information
group: Food
mode: single
- alias: MorningBriefing
description: ''
id: ca2ea9b9-5ef6-4867-af35-4ce299c817ae
triggers:
- platform: time
at: 08:00:00
conditions:
- condition: state
entity_id: input_boolean.ai_morning_briefing
state: 'on'
actions:
- action: ai_task.generate_data
data:
entity_id: ai_task.openai_ai_task
task_name: morning briefing
instructions: "Generate a morning briefing.\n\nCan you maybe add a information\
\ what happend today in the history? If yes please search for it.\nI only\
\ want correct information about the history.\nPlease check online for sources\
\ that prove that the response is correct.\nYou can tell me details about\
\ it.\n\nWith these information:\n - current date: {{ as_timestamp(states('sensor.date_time_iso'))\
\ | timestamp_custom('%A %B %-d, %I:%M %p') }}\n - Outdoor temperature: {{\
\ states('sensor.daikinap90134_outside_temperature') }}°C\n - Weather condition:\
\ {{ states('weather.home') }}\n - Indoor temperature: {{ states('sensor.wohnungstemperatur')\
\ }}°C\n - Indoor humidity: {{ states('sensor.wohnungsfeuchtigkeit') }}%\n\
\ - Is today a work day?: {{ states('binary_sensor.workday_sensor') }}\n\n\
Answer in german. Make the answer a little bit funny.\nKeep the response to\
\ a maximum of 150 characters, can't be any longer.\n"
response_variable: response
- action: input_text.set_value
target:
entity_id: input_text.ai_morning_briefing
data:
value: '{{ response.data }}'
mode: parallel
- alias: NightMode
id: 9baffe35-daa2-43fa-bdd6-985240281706
description: Nachtmodus Automation
trigger:
- platform: state
entity_id: input_boolean.night_mode
condition:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.night_mode
state: 'on'
- condition: state
entity_id: input_boolean.night_mode
state: 'off'
action:
- if:
- condition: state
entity_id: input_boolean.night_mode
state: 'on'
then:
- service: script.night_mode_on
data: {}
else:
- service: script.night_mode_off
data: {}
mode: single
- alias: NINA Warnungen
id: a708dd34-6dd1-4745-a971-debf244734a5
description: NINA Warnungen
trigger:
- platform: state
entity_id: binary_sensor.warning_home_1
to: 'on'
- platform: state
entity_id: binary_sensor.warning_home_2
to: 'on'
- platform: state
entity_id: binary_sensor.warning_home_3
to: 'on'
- platform: state
entity_id: binary_sensor.warning_home_4
to: 'on'
- platform: state
entity_id: binary_sensor.warning_home_5
to: 'on'
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- service: script.notify_engine
data:
title: 🌩️ {{ trigger.to_state.attributes.headline }} (NINA) 🌩️
value1: "{% set attributes = trigger.to_state.attributes %} {{ attributes.description\
\ }}\n*Zeitraum* ⏰ _{{ as_datetime(attributes.start) ~ \" - \" ~ as_datetime(attributes.expires)\
\ }}_\n*Handlungsempfehlung*\n {{ attributes.recommended_actions }}\n\n*Warnung\
\ von:*\n {{ attributes.sender }}\n\n*Betroffene Bereiche*\n {{ attributes.affected_areas\
\ }}"
who: home
tag_id: information
group: Wetter
- alias: MedisNotification
id: 98553e4d-5625-488b-8a7d-01c315807b24
description: Medi Notif
trigger:
- platform: time
at: input_datetime.medis_reminder_time_morning
- platform: time
at: input_datetime.medis_reminder_time_evening
- platform: time
at: input_datetime.medis_reminder_time_night
action:
- variables:
persons:
- key: miguel
device: miguel
name: Miguel
- key: silke
device: silke
name: Silke
- key: milo
device: miguel, silke
name: Milo
- key: maja
device: miguel, silke
name: Maja
medis_hourly: "{% set result = namespace(items=[]) %} {% for medi in label_entities('MedisHourly')\
\ %}\n {% if states(medi) in ['on', 'off'] and states(medi) == 'off' %}\n\
\ {% set result.items = result.items + [medi] %}\n {% endif %}\n{% endfor\
\ %} {{ result.items }}\n"
medis_daily: "{% set result = namespace(items=[]) %} {% for medi in label_entities('MedisDaily')\
\ %}\n {% if states(medi) in ['on', 'off'] and states(medi) == 'off' %}\n\
\ {% set result.items = result.items + [medi] %}\n {% endif %}\n{% endfor\
\ %} {{ result.items }}\n"
medis_weekly: "{% set result = namespace(items=[]) %} {% for medi in label_entities('MedisWeekly')\
\ %}\n {% if states(medi) in ['on', 'off'] and states(medi) == 'off' %}\n\
\ {% set result.items = result.items + [medi] %}\n {% endif %}\n{% endfor\
\ %} {{ result.items }}\n"
- variables:
all_medis: "{% set result = namespace(items=[]) %} {% for hourly in medis_hourly\
\ %}\n {% set result.items = result.items + [hourly] %}\n{% endfor %} {%\
\ for daily in medis_daily %}\n {% set result.items = result.items + [daily]\
\ %}\n{% endfor %} {% for weekly in medis_weekly %}\n {% set result.items\
\ = result.items + [weekly] %}\n{% endfor %} {{ result.items }}\n"
- variables:
medis_by_person: "{% set result = namespace(data={}) %} {% for person in persons\
\ %}\n {% set medi_list = namespace(items=[]) %}\n {% for entity_id in all_medis\
\ %}\n {% if person.key in entity_id %}\n {% set raw_name = state_attr(entity_id,\
\ 'friendly_name') or entity_id %}\n {% set name = raw_name | replace(person.name,\
\ '') | trim %}\n {% set medi_list.items = medi_list.items + [name] %}\n\
\ {% endif %}\n {% endfor %}\n {% set result.data = result.data | combine({\
\ person.key: medi_list.items | join(', ') }) %}\n{% endfor %} {{ result.data\
\ }}\n"
- repeat:
for_each: '{{ persons }}'
sequence:
- variables:
person_key: '{{ repeat.item.key }}'
person_info: '{{ repeat.item.name }}'
person_device: '{{ repeat.item.device }}'
medi_message: '{{ medis_by_person[person_key] }}'
- choose:
- conditions: '{{ medi_message != '''' }}'
sequence:
- service: script.notify_engine
data:
title: Zeit für {{ person_info }}s Medikamente!
who: '{{ person_device }}'
value1: '{{ medi_message }}'
group: Health
tag_id: information
icon: mdi:pill
actions:
- action: URI
title: Öffnen
uri: /lovelace-mobile/medication
- alias: RollladenOeffnet
id: 1bd70167-a552-4a7e-93de-2cfd0a823bc6
description: Wenn morgens der Rollladen hochgeht
trigger:
- platform: device
device_id: 2fc7242cfe1baeaaef8e393c8890e2cf
domain: cover
entity_id: cb2c427bea07f6795aa22d8414ed7dd4
type: opening
condition:
- condition: state
entity_id: input_boolean.night_mode
state: 'on'
- condition: time
after: 06:00:00
before: '12:00:00'
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.night_mode
data: {}
mode: single
- alias: PicnicBenachrichtigung
id: 5f93e5ba-c185-48f1-8653-dd8e2271a145
description: Benachrichtigt wenn Picnic bald da ist.
trigger:
- platform: template
value_template: '"{{ as_timestamp(states(''sensor.picnic_voraussichtlicher_beginn_der_nachsten_lieferung''))
- as_timestamp(now()) <= 600 }}"
'
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- service: script.notify_engine
data:
title: '🛒 Picnic 🛒
'
value1: 'Picnic kommt in den nächsten 5min.
'
tag_id: information
group: Shopping
mode: single
- id: 5d292a16-db4a-4897-88ce-1cf106efa12b
alias: Generate picture
description: Antwortet auf den /wetter Befehl
triggers:
- event_type: telegram_command
event_data:
command: /bild
trigger: event
conditions: []
actions:
- action: openai_conversation.generate_image
data:
size: 1024x1024
quality: standard
style: natural
config_entry: 01JAE4ZR2CG7T0XTAV08YDB7SS
prompt: '{{trigger.event.data[''args'']}}'
response_variable: generated
- data:
value1: '{{ generated.revised_prompt }}'
photo: '{{ generated.url }}'
who: home
tag_id: information
group: Family
action: script.notify_engine
mode: single
- alias: piholeState
id: 937b8048-a3a4-4557-9bf1-17e8d1c206bf
description: Pihole State
trigger:
- platform: state
entity_id:
- switch.pi_hole
condition: []
action:
- if:
- condition: state
entity_id: switch.pi_hole
state: 'off'
then:
- service: timer.start
target:
entity_id: timer.pihole_disabled
else:
- service: timer.cancel
target:
entity_id: timer.pihole_disabled
mode: single
- alias: piholeTimerFinish
id: 484d8c6d-7be3-4069-ba2f-1a6a24f7c8fb
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.pihole_disabled
condition: []
action:
- service: switch.turn_on
target:
entity_id: switch.pi_hole
mode: single
- alias: Pollenbenachrichtigung
id: 72ec3377-7e22-4ba2-b9a3-f3ef82261ade
description: Benachrichtigt wenn Pollen fliegen auf die einer im Haus allergisch
ist.
trigger:
- platform: state
entity_id:
- sensor.pollenflug_graeser_112
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- condition: numeric_state
entity_id: sensor.pollenflug_graeser_112
above: 0
action:
- service: script.notify_engine
data:
title: '☠️🌺 Pollenflug 🌺☠️
'
value1: '{{ trigger.to_state.attributes.friendly_name }} haben heute eine "{{ trigger.to_state.attributes.state_today_desc }}"
und morgen eine "{{ trigger.to_state.attributes.state_tomorrow_desc }}".
Status heute: {{ trigger.to_state.state }}
Status morgen: {{ trigger.to_state.attributes.state_tomorrow }}
'
who: home
tag_id: information
group: Health
mode: single
- alias: Rain trigger
id: 00f0df21-aa56-4fc4-8f8e-56b983c49e6f
description: Set boolean while raining
trigger:
- platform: state
entity_id: weather.home
condition: []
action:
- if:
- condition: state
entity_id: weather.home
state: rainy
then:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.raining
else:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.raining
mode: single
- description: Remove old snapshots
alias: RemoveOldSnapshots
id: 7e4dceda-e410-4827-8ae0-776c16ae1511
mode: single
triggers:
- trigger: time
at: 00:15:00
conditions: []
actions:
- action: shell_command.removesnapshots
metadata: {}
data: {}
- alias: MedisResetBool
id: b67001f4-cf8f-414d-a1bb-84fe46b2b37b
description: Medis reset
trigger:
- platform: time
at: 00:01:00
id: daily
- trigger: time
at:
entity_id: input_datetime.medis_reminder_time_morning
offset: -01:00:00
id: morgens
- trigger: time
at:
entity_id: input_datetime.medis_reminder_time_evening
offset: -01:00:00
id: mittags
- trigger: time
at:
entity_id: input_datetime.medis_reminder_time_night
offset: -01:00:00
id: abends
action:
- if:
- alias: check if it is the daily Trigger
condition: template
value_template: '{{ trigger.id == ''daily'' }}'
then:
- action: input_boolean.turn_off
target:
label_id: medisdaily
- variables:
heuschnupfen: "{%- for medi in label_entities('MedisDaily') | list if states(medi)\
\ in ('on','off') -%}\n {%- if \"heuschnupfen\" in medi -%}\n {{ medi\
\ }}\n {%- endif -%}\n{%- endfor -%}\n"
- choose:
- conditions: '{{ heuschnupfen != '''' }}'
sequence:
- repeat:
for_each: '{{ heuschnupfen.split('' '') }}'
sequence:
- variables:
pollen_typ: '{{ repeat.item.split(''_'')[4] }}'
pollen_sensor: sensor.pollenflug_{{ pollen_typ }}_112
- condition: template
value_template: '{{ states(repeat.item) != ''on'' and states(pollen_sensor)
| float == 0 }}
'
- action: input_boolean.turn_on
target:
entity_id: '{{ repeat.item }}'
alias: Heuschnupfen anschalten, wenn gerade keine Pollen unterwegs sind
- condition: time
weekday:
- sun
- action: input_boolean.turn_off
target:
label_id: medisweekly
else:
- action: input_boolean.turn_off
target:
label_id:
- medishourly
- '{{ trigger.id }}'
- alias: Reset picnic counter
id: 0adfa03b-b03a-487c-961c-657907bc05d5
description: Reset picnic counter every month
trigger:
- platform: time_pattern
hours: 0
minutes: 0
condition:
- condition: template
value_template: '{{ now().day == 1 }}'
action:
- if:
- condition: template
value_template: '{{ now().month == 1 }}'
then:
- action: counter.reset
target:
entity_id:
- counter.picnic_jahres_kosten
data: {}
alias: Check if it january
- action: counter.reset
target:
entity_id:
- counter.picnic_monats_kosten
data: {}
mode: single
- alias: RolladenLueften
id: 907a7f7e-836e-4a75-b98c-a793f0da9534
description: Öffnet Rolladen zum Lüften
trigger:
- platform: template
value_template: '{{ state_attr( "weather.home", "temperature" ) < state_attr("climate.daikinap90134",
"current_temperature") }}
'
condition:
- condition: state
entity_id: binary_sensor.nacht
state: 'off'
- condition: numeric_state
entity_id: cover.rollladen_schlafzimmer
attribute: current_position
below: '40'
- condition: state
entity_id: input_boolean.lueften_aktiv
state: 'on'
- condition: or
conditions:
- below: '23'
entity_id: sensor.daikinap90134_outside_temperature
condition: numeric_state
- below: '23'
entity_id: weather.home
attribute: temperature
condition: numeric_state
- condition: not
conditions:
- condition: state
entity_id: weather.home
state: sunny
action:
- service: cover.open_cover
data: {}
target:
entity_id: cover.rollladen_schlafzimmer
mode: single
- alias: RolladenSunrise
id: 24fa0d54-ffb8-43d3-9e55-ebdd262deaf0
description: Schließt Rolladen vor Sonnenaufgang
trigger:
- platform: sun
event: sunrise
offset: -01:00:00
condition:
- condition: numeric_state
entity_id: cover.rollladen_schlafzimmer
attribute: current_position
above: '40'
- condition: state
entity_id: input_boolean.sonnen_wegblenden_schlafen_aktiv
state: 'on'
action:
- service: cover.set_cover_position
data:
position: 6
target:
entity_id: cover.rollladen_schlafzimmer
mode: single
- alias: Rollladen Sonnenschutz
id: 35a45982-41c2-4a64-b724-aa559b81e9fd
description: Schließt Rollladen, wenn es zu warm ist
trigger:
- above: '23'
entity_id: sensor.daikinap90134_outside_temperature
platform: numeric_state
- above: '23'
entity_id: weather.home
attribute: temperature
platform: numeric_state
condition:
- condition: time
after: 09:00:00
before: '19:00:00'
- condition: state
entity_id: input_boolean.sonnen_schutz_aktiv
state: 'on'
action:
- if:
- condition: numeric_state
entity_id: cover.rollladen_schlafzimmer
attribute: current_position
above: '40'
then:
- service: cover.set_cover_position
data:
position: 23
target:
entity_id: cover.rollladen_schlafzimmer
- if:
- condition: numeric_state
entity_id: cover.wohnzimmerrolladen
attribute: current_position
above: '40'
then:
- service: cover.set_cover_position
data:
position: 23
target:
entity_id: cover.wohnzimmerrolladen
- if:
- condition: numeric_state
entity_id: cover.rolladen_kinderzimmer
attribute: current_position
above: '40'
then:
- service: cover.set_cover_position
data:
position: 23
target:
entity_id: cover.rolladen_kinderzimmer
mode: single
- alias: Einkaufsbenachrichtigung
id: 9c0cb04f-09bc-49f6-a9d8-e5ec3ff73f2b
description: Einkaufsbenachrichtigung
trigger:
- platform: state
entity_id:
- zone.rewe
- zone.kaufland
from: '0'
for:
hours: 0
minutes: 3
seconds: 0
id: picnic_einkaufswagen
- platform: state
entity_id:
- zone.getranke_markt
from: '0'
for:
hours: 0
minutes: 3
seconds: 0
id: getranke
- platform: state
entity_id:
- zone.dm
from: '0'
for:
hours: 0
minutes: 3
seconds: 0
id: dm_einkaufen
condition: []
action:
- variables:
list_id: todo.{{ trigger.id }}
- condition: template
value_template: '{{ states(list_id) | int > 0 }}'
- action: todo.get_items
target:
entity_id: '{{ list_id }}'
data:
status: needs_action
response_variable: incompleteItems
- action: script.notify_engine
data:
title: Einkaufsliste - {{ states(list_id) }} Dinge
value1: "{% for i in incompleteItems[list_id]['items'] %}\n - {{ i.summary\
\ }} {%\nendfor %}\n"
who: home
tag_id: information
group: Einkauf
mode: single
- alias: Shower
id: 2e10ac5d-5d52-4006-9b95-b46e4d241b99
description: Shower automation
trigger:
- platform: state
entity_id: binary_sensor.dusche
to: 'on'
condition: []
action:
- service: script.spotify_audio
data:
volume: 0.6
type: playlist
media_id: https://open.spotify.com/playlist/5r4YRJTzgAObYU4pXbWW9a?si=80e65565a3b24adb&pt=5c44bf58d4ec568bfccbf89cb14e8b3c
source: Echo_Gross
mode: single
- alias: SilkeWork
id: 4b8a1925-f831-4168-bdc2-697f63d79f3c
description: Wenn Silke arbeiten muss
trigger:
- platform: state
entity_id: schedule.silke_arbeit
condition: []
action:
- if:
- condition: state
entity_id: schedule.silke_arbeit
state: 'on'
then:
- action: input_select.select_option
target:
entity_id: input_select.milo_person_sync
data:
option: miguel
else:
- action: input_select.select_option
target:
entity_id: input_select.milo_person_sync
data:
option: silke
mode: single
- id: 87a6c36c-7123-4083-bd32-0927d6fa36c4
alias: snapshotOnDoorChange
description: ''
trigger:
- platform: state
entity_id: binary_sensor.hausture
to: 'on'
condition:
- condition: state
entity_id: switch.flur_cam_stecker
state: 'on'
action:
- action: browser_mod.popup
data:
content:
type: picture-entity
entity: camera.flurcam
show_state: false
show_name: false
camera_view: live
autoclose: true
timeout: 30000
title: Haustüre wurde geöffnet
size: classic
allow_nested_more_info: false
- variables:
timestamp: '{{ state_attr("camera.flurcam", "friendly_name") }}_{{ now().strftime("%Y%m%d-%H%M%S")
}}'
- variables:
file_path: /media/{{ timestamp }}.mp4
pic_path: '{{ timestamp }}.jpg'
start: '{{ now() }}'
- action: camera.snapshot
target:
entity_id: camera.flurcam
data:
filename: /config/www/cams/{{ pic_path }}
- action: script.notify_engine
data:
title: Haustüre
value1: Haustüre wurde geöffnet!
tag_id: security
who: tv_overlay
group: Alarm
photo: http://{{states('input_text.server_ip')}}:8123/local/cams/{{ pic_path
}}
- variables:
end: '{{ now() }}'
- event: cam_event
event_data:
event: Haustüre geöffnet
starts: '{{ start }}'
ends: '{{ end }}'
summary: Haustüre wurde geöffnet
key_frame: /local/cams/{{ pic_path }}
camera: camera.flurcam
- action: camera.record
target:
entity_id:
- camera.flurcam
data:
duration: 5
filename: '{{ file_path }}'
mode: single
- alias: Show spotify on the clock
id: 65f0caac-6ebc-4025-af11-4ef6bf3b75e1
description: Show spotify on the clock
trigger:
- platform: state
entity_id: media_player.spotify_miguel
condition:
- condition: state
entity_id: group.parents
state: home
action:
- if:
- condition: state
entity_id: media_player.spotify_miguel
state: playing
then:
- action: script.awtrix3customapp
data:
app_id: spotify
text: '{{states.media_player.spotify_miguel.attributes.media_title}}'
icon: '12676'
repeat: 1
else:
- action: script.awtrix3delapp
data:
app_id: spotify
mode: single
- description: Spülmaschine aktiv
alias: SpuelmaschineActive
id: a444c0eb-c032-4e9c-b923-6244fe1a24b8
mode: single
triggers:
- type: power
device_id: 693f221d9b27a211511a735ae34fc6d0
entity_id: 63bfc36a2f736572074819f62b69d6ca
domain: sensor
trigger: device
above: 30
id: 'on'
for:
hours: 0
minutes: 1
seconds: 0
- type: power
device_id: 693f221d9b27a211511a735ae34fc6d0
entity_id: 63bfc36a2f736572074819f62b69d6ca
domain: sensor
trigger: device
below: 1
id: 'off'
for:
hours: 0
minutes: 1
seconds: 0
conditions: []
actions:
- if:
- condition: trigger
id:
- 'on'
then:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.spulmaschine_aktiv
else:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.spulmaschine_aktiv
- alias: Show state of miguel
id: f6d85177-1780-4f92-a00b-db0a583a1bad
description: Show miguels state on clock
trigger:
- platform: state
entity_id: person.miguel
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- if:
- condition: state
entity_id: person.miguel
state: home
then:
- action: script.awtrix3delapp
data:
app_id: miguel
else:
- action: script.awtrix3customapp
data:
app_id: miguel
text: '{{ states(''person.miguel'') }}'
icon: '28759'
mode: single
- alias: Show state of milo
id: de7d8756-e929-4001-ade4-1c02b9a2c5c6
description: Show milos state on clock
trigger:
- platform: state
entity_id: person.milo_carlos
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- if:
- condition: state
entity_id: person.milo_carlos
state: home
then:
- action: script.awtrix3delapp
data:
app_id: milo
else:
- action: script.awtrix3customapp
data:
app_id: milo
text: '{{ states(''person.milo_carlos'') }}'
icon: '48342'
mode: single
- alias: Show state of silke
id: 9503b5e7-7f22-4687-afd2-c9aed8be4696
description: Show silkes state on clock
trigger:
- platform: state
entity_id: person.silke
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- if:
- condition: state
entity_id: person.silke
state: home
then:
- action: script.awtrix3delapp
data:
app_id: silke
else:
- action: script.awtrix3customapp
data:
app_id: silke
text: '{{ states(''person.silke'') }}'
icon: '19702'
mode: single
- alias: majaStatus
id: af0110f3-a36b-4434-8fde-b867c9d68de1
description: Sync Maja State with silke state
trigger:
- platform: state
entity_id:
- person.silke
- person.miguel
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- condition: template
value_template: '{% set personName = "person." ~ states("input_select.maja_person_sync")
%}
{{ trigger.entity_id == personName }}'
action:
- if:
- condition: template
value_template: '{% set personName = "person." ~ states("input_select.maja_person_sync")
%}
{{ states(personName) == "home" }}'
then:
- service: input_boolean.turn_on
entity_id: input_boolean.maja_home
else:
- service: input_boolean.turn_off
entity_id: input_boolean.maja_home
- service: device_tracker.see
data:
location_name: '{% set personName = "person." ~ states("input_select.maja_person_sync")
%}
{{ states(personName) }}'
dev_id: maja_dummy_tracker
gps:
- '{{ state_attr(''person.'' ~ states(''input_select.maja_person_sync''), ''latitude'')
}}'
- '{{ state_attr(''person.'' ~ states(''input_select.maja_person_sync''), ''longitude'')
}}'
gps_accuracy: '{% set personName = "person." ~ states("input_select.maja_person_sync")
%}
{{ state_attr(personName, "gps_accuracy") }}'
mode: queued
max: 10
- alias: Sunrise
id: 4ee75af6-8365-4e9f-85a8-4e71b2c9c67a
description: Sonnenaufgangsautomation
trigger:
- platform: sun
event: sunrise
offset: -00:30:00
condition: []
action:
- service: script.sunrise_script
data: {}
mode: single
- alias: Sunset
id: a383092c-b90f-4357-8ca7-931e2b0e58a9
description: Sonnenuntergangsautomation
trigger:
- platform: sun
event: sunset
offset: -00:45:00
condition: []
action:
- service: script.sunset_script
data: {}
mode: single
- alias: Wecker 3 synchronisieren
id: 6f228bce-1c81-4807-9c66-59ce30b2a5f9
trigger:
- platform: state
entity_id: sensor.pixel_9_pro_next_alarm
- platform: state
entity_id: sensor.silke_handy_next_alarm
action:
- service: input_datetime.set_datetime
entity_id: input_datetime.wecker_family
data_template:
datetime: "{% set wecker1_time = as_timestamp(states('sensor.pixel_9_pro_next_alarm'))\
\ %} {% set wecker2_time = as_timestamp(states('sensor.silke_handy_next_alarm'))\
\ %} {% if wecker1_time >= wecker2_time %}\n {{ strptime(as_local(wecker1_time).strftime('%Y-%m-%d\
\ %H:%M:%S'), '%Y-%m-%d %H:%M:%S') }}\n{% else %}\n {{ strptime(as_local(wecker2_time).strftime('%Y-%m-%d\
\ %H:%M:%S'), '%Y-%m-%d %H:%M:%S') }}\n{% endif %}"
- alias: SyncAlarmFromMobile
id: d51b6739-a9df-405d-9a8a-903c8082c0eb
description: Sync Wecker
trigger:
- platform: state
entity_id: sensor.pixel_9_pro_next_alarm
id: miguel
- platform: state
entity_id: sensor.silke_handy_next_alarm
id: silke
condition: []
action:
- if:
- condition: trigger
id: miguel
then:
- service: input_datetime.set_datetime
data:
timestamp: '{{ ( state_attr("sensor.pixel_9_pro_next_alarm", "Time in Milliseconds") |
int / 1000 ) }}'
target:
entity_id: input_datetime.miguel_wecker
else:
- service: input_datetime.set_datetime
data:
timestamp: '{{ ( state_attr("sensor.silke_handy_next_alarm", "Time in Milliseconds") |
int / 1000 ) }}'
target:
entity_id: input_datetime.silke_wecker
mode: single
- alias: Sync electricity price
id: 5b023ec5-2f0a-489d-8f00-efbba8af1a2b
description: Sync electricity price
trigger:
- platform: state
entity_id: sensor.epex_spot_data_net_price
condition: []
action:
- action: input_number.set_value
target:
entity_id: input_number.strompreis
data:
value: '{% set val = states(''sensor.epex_spot_data_net_price'') | float(0)
%} {{ ((val * 100) | round(0, ''ceil'')) / 100 }}
'
mode: single
- alias: TasksNotif
id: afa5aa6b-7cf4-43bb-bb47-d37601433dea
description: Benachrichtigt, wenn ToDo's anstehen.
trigger:
- platform: time
at: input_datetime.chores_notif_time
condition:
- condition: not
conditions:
- condition: state
entity_id: sensor.grocy_tasks
state: '0'
action:
- variables:
filtered_tasks: "{% set todos = state_attr(\"sensor.grocy_tasks\", \"tasks\"\
) %} {% set now = now().astimezone() %} {% set upcoming = now + timedelta(days=10)\
\ %}\n{% set filtered = namespace(tasks=[]) %} {% for task in todos %}\n \
\ {% if task.due_date is defined and task.due_date %}\n {% set due = as_datetime(task.due_date)\
\ %}\n {% if due.tzinfo is none %}\n {% set due = due.replace(tzinfo=now.tzinfo)\
\ %}\n {% endif %}\n {% if due.date() >= now.date() and due.date() <=\
\ upcoming.date() %}\n {% set filtered.tasks = filtered.tasks + [task]\
\ %}\n {% endif %}\n {% endif %}\n{% endfor %} {% set sorted_tasks = filtered.tasks\
\ | sort(attribute='category.name') %} {{ sorted_tasks }}\n"
- service: script.notify_engine
data:
title: 📑 ToDo's in den nächsten Tagen 📑
value1: "{% set current_cat = '' %} {% if filtered_tasks %} Folgende ToDo's\
\ stehen in den nächsten 10 Tagen an:\n{%- for task in filtered_tasks %}\n\
\ {%- set cat = task.category.name if task.category is defined and task.category.name\
\ is defined else 'Ohne Kategorie' %}\n {%- if cat != current_cat %}\n\U0001F4D1\
\ Kategorie: {{ cat }}\n {%- set current_cat = cat %}\n {%- endif %}\n\
- {{ task.name }}\n \U0001F4DD {{ task.description or '' }}\n \U0001F464\
\ {{ task.assigned_to_user.display_name if task.assigned_to_user is defined\
\ and task.assigned_to_user.display_name is defined else 'Unbekannt' }}\n\
\ \U0001F5D3 {{ as_timestamp(task.due_date) | timestamp_custom('%d.%m.%Y\
\ %H:%M') }}\n\n{%- endfor %} {% else %} ✅ Es stehen keine ToDo's in den nächsten\
\ 10 Tagen an. {% endif %}\n"
who: home
tag_id: information
group: Hausarbeiten
mode: single
- alias: Show temperature on clock
id: 4439da33-a3b6-4566-981d-fcfa49f6786b
description: ' Show temperature on clock'
trigger:
- platform: state
entity_id: sensor.wohnungstemperatur
condition: []
action:
- action: script.awtrix3customapp
data:
app_id: temperature
text: '{{ states(''sensor.wohnungstemperatur'') }} {{ state_attr(''sensor.wohnungstemperatur'',
''unit_of_measurement'') }}'
icon: '4481'
mode: single
- alias: Scheduled flight takes off
id: a4d5f9d0-3232-443c-95e8-18ff404959c6
trigger:
platform: event
event_type: flightradar24_tracked_took_off
action:
- service: script.notify_engine
data:
title: Flight
value1: Flight takes off {{ trigger.event.data.callsign }} to {{ trigger.event.data.airport_destination_city
}} [Open FlightRadar](https://www.flightradar24.com/{{ trigger.event.data.callsign
}})
who: home
tag_id: information
group: Flights
- service: script.notify_engine
data:
title: Flight
value1: Flight takes off {{ trigger.event.data.callsign }} to {{ trigger.event.data.airport_destination_city
}} [Open FlightRadar](https://www.flightradar24.com/{{ trigger.event.data.callsign
}})
who: family
tag_id: information
group: Flights
- alias: Scheduled flight lands
id: 9b87a72c-877b-44c2-8181-73437d50869d
trigger:
platform: event
event_type: flightradar24_tracked_landed
action:
- variables:
title: Flight
message: Flight landed {{ trigger.event.data.callsign }} to {{ trigger.event.data.airport_destination_city
}} [Open FlightRadar](https://www.flightradar24.com/{{ trigger.event.data.callsign
}})
- service: script.notify_engine
data:
title: '{{ title }}'
value1: '{{ message }}'
who: home, family
tag_id: information
group: Flights
- service: text.set_value
data:
value: '{{ trigger.event.data.aircraft_registration }}'
target:
entity_id: text.flightradar24_remove_from_track
- id: dc32d4be-a49c-4a0e-81e1-2a85f6ed6758
alias: alarmOnContact
description: Bei Änderung der Kontaktsensoren Alarm auslösen
trigger:
- platform: state
entity_id: group.contact_sensors
to: 'on'
condition:
- condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_away
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_home
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_vacation
action:
- service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.alarmo
- service: script.notify_engine
data:
title: 🏃 Bewegung 🏃
value1: '{{ trigger.to_state.attributes.friendly_name }} wurde geöffnet.'
who: home
tag_id: alert
group: Alarm
mode: single
- id: 1838588e-2696-4082-8f5b-ef025daf94c4
alias: alarmOnDoorOpen
description: Alarm auslösen, wenn die Tür geöffnet wird.
trigger:
- platform: state
entity_id: lock.hausture
from: locked
to: unlocked
condition:
- condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_away
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_home
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_vacation
action:
- service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.alarmo
- service: script.notify_engine
data:
title: 🚪 Türe 🚪
value1: '{{ trigger.to_state.attributes.friendly_name }} wurde geöffnet.'
who: home
tag_id: alert
group: Alarm
mode: single
- id: b06e36c7-31a2-429d-88e5-70fdcf2d72c7
alias: unarmAlarm
description: Alarm automatisch abschalten
trigger:
- platform: state
entity_id: group.residents
to: home
condition:
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_away
action:
- service: alarm_control_panel.alarm_disarm
entity_id: alarm_control_panel.alarmo
data:
code: secret alarm_code
- alias: UpdateDocumentation
id: 6b1b4b5e-8da3-48a1-904f-a20728b3c67c
description: Automatischer commit und update der Docu
trigger:
- trigger: time
at: '23:55:00'
condition: []
action:
- service: script.update_docs_script
- service: shell_command.update_docs
mode: single
- alias: Update Available Notification
id: 11defef9-9e5c-41ff-8657-d5a79f384861
trigger:
- platform: state
entity_id: binary_sensor.home_assistant_versions_update_available
from: 'off'
to: 'on'
action:
- service: script.notify_engine
data:
title: Update available
value1: '{{ state_attr(''binary_sensor.home_assistant_versions_update_available'',
''friendly_name'') }}.'
who: miguel
tag_id: information
group: System
mode: single
- alias: UrlaubsmodusAutom
id: d671c363-5a0c-4f56-b8ff-857234b23b61
description: Schaltet das Smart Home System in den Urlaubsmodus.
trigger:
- platform: state
entity_id: alarm_control_panel.alarmo
condition: []
action:
- if:
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_vacation
then:
- service: input_boolean.turn_on
entity_id: input_boolean.holiday_mode
- if:
- condition: state
entity_id: alarm_control_panel.alarmo
state: disarmed
- condition: state
entity_id: input_boolean.holiday_mode
state: 'on'
then:
- service: input_boolean.turn_off
entity_id: input_boolean.holiday_mode
mode: single
- alias: VaccumCleaner
id: 4904b3cf-2099-4f13-8565-43719f3e74b6
description: Lässt den Staubsaugroboter laufen, wenn wir mit Maja draußen sind
trigger:
- platform: state
entity_id: input_boolean.maja_home
condition:
- condition: state
entity_id: input_boolean.automatic_cleaning
state: 'on'
action:
- service: script.cleaning_without_dog
data: {}
mode: single
- alias: Robot finishes cleaning
id: b2bad212-5d9a-40d5-b64b-94aacdaabb6d
trigger:
- platform: state
entity_id:
- vacuum.roomba
from: cleaning
to: docked
action:
- action: grocy.execute_chore
data:
chore_id: '2'
done_by: '1'
- alias: WashingNotif
id: 85d51d88-d162-4a4b-b1ee-d09e818afb98
description: Benachrichtigt wenn die Waschmaschine fertig ist
trigger:
- platform: numeric_state
entity_id: sensor.waschmaschinen_steckdose_power
below: '1.0'
for: 00:01:00
- platform: state
entity_id: sensor.waschmaschine_operation_state
to: Finished
condition:
- condition: state
entity_id: input_boolean.wash_active
state: 'on'
action:
- action: script.notify_engine
data:
title: '🧼 Waschmaschine 🧼
'
value1: '{% set cycleConsumption = ( states("sensor.waschmaschinen_steckdose_energy")
| float - states("input_number.wash_cycle_consumption") | float ) %} {% set
costs = cycleConsumption * states("input_number.strompreis") | float(2) %}
Waschmaschine ist fertig. Verbrauch {{ cycleConsumption | float|round(2) }}
kWh. Das macht ca. {{ costs | float|round(2) }} €'
who: home
tag_id: information
group: Laundry
- action: input_boolean.turn_off
target:
entity_id: input_boolean.wash_active
- action: grocy.execute_chore
data:
chore_id: '1'
done_by: '1'
mode: single
- alias: WashingActive
id: 129efe4c-3890-4012-867f-6317c8e5021d
description: Setzt den Helfer, wenn die Waschmaschine läuft.
trigger:
- platform: state
entity_id: sensor.waschmaschine_operation_state
to: Run
- platform: numeric_state
entity_id: sensor.waschmaschinen_steckdose_power
above: '15'
for: 00:01:00
condition:
- condition: state
entity_id: input_boolean.wash_active
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.wash_active
- service: input_number.set_value
data_template:
value: '{{ states(''sensor.waschmaschinen_steckdose_energy'') }}'
entity_id: input_number.wash_cycle_consumption
mode: single
- alias: Show waste on clock
id: 33ea773e-67d2-4f5c-97ba-778d098b0ade
description: Show waste on clock
trigger:
- platform: state
entity_id: sensor.nachste_abfuhrtermine
condition: []
action:
- if:
- condition: template
value_template: '{{ trigger.to_state.attributes.daysTo | int <= 1 }}'
then:
- action: script.awtrix3customapp
data:
app_id: waste
text: '{{ trigger.to_state.state }}'
icon: '57283'
else:
- action: script.awtrix3delapp
data:
app_id: waste
mode: parallel
- alias: WateringNotifIndoor
id: 794c14fa-fac7-4d5c-85a0-b6551ad75507
description: Benachrichtigt, ob die Pflanzen drinnen gegossen werden müssen.
trigger:
- platform: time
at: input_datetime.watering_time
condition:
- condition: state
entity_id: sensor.weekday
state: Sunday
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- service: script.notify_engine
data:
title: '🌊🌿 Gießen 🌊🌿
'
value1: 'Pflanzen in der Wohnung müssen heute gegossen werden!
'
who: home
tag_id: information
group: Pflanzen
mode: single
- alias: Track Chore Water Bath
id: b900d37b-f0b2-4155-8251-bc7acbb7f1d4
description: Track Chore Water Bath
trigger:
- trigger: state
entity_id:
- sensor.wasser_warm_bad
condition: []
action:
- action: grocy.execute_chore
data:
chore_id: '8'
done_by: '2'
mode: single
- alias: Track Chore Water WC
id: 1a599a28-f737-4dcc-996a-38a7a6c647f4
description: Track Chore Water WC
trigger:
- trigger: state
entity_id:
- sensor.wasser_klo_warm
condition: []
action:
- action: grocy.execute_chore
data:
chore_id: '9'
done_by: '2'
mode: single
- alias: WateringNotifOutdoor
id: 1458fb06-3f77-4669-8e72-0a7ec224be45
description: Benachrichtigt, ob die Pflanzen draußen gegossen werden müssen.
trigger:
- platform: time
at: input_datetime.watering_time
condition:
- condition: not
conditions:
- condition: state
entity_id: weather.home
state: rainy
- condition: template
value_template: '{% set days = 1 %} {{ ''rainy'' in state_attr(''weather.home'',
''forecast'')[:days] | map(attribute=''condition'') }}
'
- condition: numeric_state
entity_id: sensor.rained_last_day
below: 1
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: sensor.season
state: spring
- condition: state
entity_id: sensor.season
state: summer
action:
- service: script.notify_engine
data:
title: '🌊🌿 Gießen 🌊🌿
'
value1: 'Pflanzen müssen heute gegossen werden!
'
who: home
tag_id: information
group: Pflanzen
mode: single
- alias: ShowerWater
id: 088d95b7-fe66-4f6f-b451-36f57089a574
description: Setzt den Duschstatus anhand des Wassersensors
trigger:
- platform: state
entity_id: binary_sensor.duschsensor_water_leak
condition:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.duschsensor_water_leak
state: 'on'
- condition: state
entity_id: binary_sensor.duschsensor_water_leak
state: 'off'
action:
- if:
- condition: state
entity_id: binary_sensor.duschsensor_water_leak
state: 'on'
then:
- service: input_boolean.turn_on
entity_id: input_boolean.shower_active
else:
- service: input_boolean.turn_off
entity_id: input_boolean.shower_active
mode: single
- alias: Weather indicator TV
id: 54e10e2c-91a5-43cd-a7d2-d0087effef06
trigger:
- platform: state
entity_id:
- weather.home
condition: []
action:
- service: notify.tvoverlaynotifyfixed
data:
data:
id: fixed_weather
icon: '{% if is_state("weather.home","sunny") %} mdi:weather-sunny {% elif
is_state("weather.home","clear-night") %} mdi:weather-night {% elif is_state("weather.home","rainy")
%} mdi:weather-rainy {% elif is_state("weather.home","snow") %} mdi:weather-snowy
{% elif is_state("weather.home","fog") %} mdi:weather-fog {% elif is_state("weather.home","sleet")
%} mdi:weather-partly-snowy-rainy {% elif is_state("weather.home","wind")
%} mdi:weather-windy {% elif is_state("weather.home","cloudy") %} mdi:weather-cloudy
{% elif is_state("weather.home","partlycloudy") %} mdi:weather-partly-cloudy
{% elif is_state("weather.home","partlycloudy-night") %} mdi:weather-night-partly-cloudy
{% elif is_state("weather.home","hail") %} mdi:weather-hail {% elif is_state("weather.home","lightning")
%} mdi:weather-lightning {% elif is_state("weather.home","thunderstorm")
%} mdi:weather-lightning-rainy {% endif %}'
expiration: 12h
shape: circle
message: '{{ state_attr(''weather.home'', ''temperature'') | round }}°'
mode: single
- alias: Weather image
description: ''
id: 665e5eb0-932c-4a69-8dc6-99875649df6c
triggers:
- trigger: state
entity_id: weather.home
conditions: []
actions:
- action: openai_conversation.generate_image
data:
size: 1024x1024
quality: standard
style: vivid
config_entry: 01JAE4ZR2CG7T0XTAV08YDB7SS
prompt: Leingarten wenn das Wetter so ist {{ states("weather.home") }} zur der
Uhrzeit {{ states('sensor.date_time_iso') }}. Bitte auch den Mond {{ states('sensor.moon')
}} die Sonne {{ states('sun.sun') }} und die Jahreszeit {{ states('sensor.season')
}} beachten.
response_variable: generated_image
- alias: Send out a manual event to update the image entity
event: new_weather_image
event_data:
url: '{{ generated_image.url }}'
mode: single
- alias: WeatherAIPic
description: ''
id: c2e4550d-1016-4ff5-bff6-9d73d092a773
triggers:
- trigger: state
entity_id: weather.home
conditions: []
actions:
- action: openai_conversation.generate_image
data:
size: 1024x1024
quality: standard
style: vivid
config_entry: 01JAE4ZR2CG7T0XTAV08YDB7SS
prompt: 'Show the town of {{ state_attr(''weather.home'', ''friendly_name'')
}} in Germany in the picture. Include a dog in the image wearing clothing
which reflects the weather. The dog is a famous tv-presenter who is presenting
the weather-report live on-air right now.
It is {{ states(''weather.home'') }}, but keep in mind that the sun is {{
states(''sun.sun'') | replace(''_'', '' the '')}}. The temperature is {{ state_attr(''weather.home'',''temperature'')
}}{{ state_attr(''weather.home'',''temperature_unit'') }}.
Make it as realistic as possible.'
response_variable: picture
- action: downloader.download_file
data:
overwrite: true
url: '{{ picture.url }}'
filename: weather_home.png
subdir: weather
mode: parallel
- alias: weddingDay
id: 434eeb1e-ac51-4b60-a424-736b54d44c9b
description: Hochzeitstag
trigger:
- platform: state
entity_id: sensor.anniversary_special_hochzeitstag
condition:
- condition: or
conditions:
- condition: template
value_template: '{{ states(trigger.entity_id) == 0 }}'
- condition: template
value_template: '{{ states(trigger.entity_id) >= 363 }}'
action:
- if:
- condition: template
value_template: '{{ states(trigger.entity_id) == 0 }}'
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.herz
else:
- service: switch.turn_off
data: {}
target:
entity_id: switch.herz
mode: single
- alias: workDone
id: db7c5885-b42d-4db0-a1ff-3fce6572cac7
description: Sync GPS Coords with work laptop
trigger:
- platform: state
entity_id: device_tracker.bcwmc5cg4100cy0
to: not_home
condition: []
action:
- service: light.turn_off
target:
area_id: buro
mode: single
- alias: workStarting
id: bece8ed6-e1d0-44d9-a167-85413735c362
description: Geschäftslaptop befindet sich im Netz
trigger:
- platform: state
entity_id: device_tracker.bcwmc5cg4100cy0
to: home
condition:
- condition: state
entity_id: input_boolean.status_light
state: 'on'
action:
- service: scene.create
data:
snapshot_entities:
- light.schreibtischlicht
scene_id: pre_work
- service: light.turn_on
data:
color_name: darkgreen
target:
entity_id: light.schreibtischlicht
- service: light.turn_on
data:
effect: blink
target:
entity_id: light.schreibtischlicht
- service: scene.turn_on
target:
entity_id: scene.pre_work
data: {}
mode: single