diff --git a/automations/ground_corridor/door_sensor_stalltuer_changed.yaml b/automations/ground_corridor/door_sensor_stalltuer_changed.yaml new file mode 100644 index 0000000..0cd5f9a --- /dev/null +++ b/automations/ground_corridor/door_sensor_stalltuer_changed.yaml @@ -0,0 +1,19 @@ +# https://www.home-assistant.io/docs/automation/trigger/#event-trigger +description: Änderung Türsensor Stalltür +alias: Änderung Türsensor Stalltür +id: ae10d07b-6c61-42f4-9e5d-856fca38462c +trigger: + - platform: state + entity_id: binary_sensor.door_sensor_stallteur_access_control_window_door_is_open +action: + - service: notify.dev_telegram + data: + message: > + {% if is_state('binary_sensor.door_sensor_stallteur_access_control_window_door_is_open', 'on') %} + Stalltür wurde geöffnet + {% else %} + Stalltür wurde geschlossen + {% endif %} + + # TODO: ggf. Alarm auslösen + diff --git a/scripts/run_at_sunset_event.yaml b/scripts/run_at_sunset_event.yaml new file mode 100644 index 0000000..e79eb3f --- /dev/null +++ b/scripts/run_at_sunset_event.yaml @@ -0,0 +1,18 @@ +alias: Skript run at sunset +variables: + message_stalltuer_required: > + {% if is_state('binary_sensor.door_sensor_stallteur_access_control_window_door_is_open','on') %} + True + {% else %} + False + {% endif %} +sequence: + - service: notify.dev_telegram + data: + message: > + Türen werden überprüft: "{{ message_stalltuer_required }}"" + - condition: template + value_template: "{{ message_stalltuer_required }}" + - service: notify.chk_telegram + data: + message: Stalltür ist noch offen \ No newline at end of file