Hey hey
For my garbage pickup I created a calendar called “Müll zuhause” and added whole day tasks for every type of garbage pickup. Those are: “Papier”, “gelber Sack”, “Hausmüll”.
I then created the follwoing automation, to give me a telegramm message, when my car arrives home and there is an upcoming garbage event:
alias: Ingeborg kommt nach Hause - Müllbenachrichtigung
description: ""
trigger:
- platform: zone
entity_id: device_tracker.ingeborg
zone: zone.zuhause
event: enter
condition: []
action:
- service: calendar.get_events
target:
entity_id:
- calendar.mull_zuhause
data:
duration:
hours: 24
minutes: 0
seconds: 0
response_variable: muellabholung
- variables:
events: "{{ muellabholung['calendar.mull_zuhause'].events }}"
- if:
- condition: template
value_template: "{{ events | count > 0 }}"
then:
- service: notify.telegrambeide
data:
message: |-
{% for event in events %}{{event.summary}} wird morgen abgeholt
{% endfor %}
data:
disable_notification: false
title: "*Müllalarm*"
enabled: true
mode: single
My problem with this is shown in the following example.
Imagine there is a “Hausmüll” pickup tommorrow (So I have this event as a whole day task in my calendar). I then get notified TODAY. But TOMMORROW I will get notified, too, because the task is within the requested 24h range in my automation.
Is there any solution for this (expect changing all my calendar entries)?