|
| 1 | +#------------------------------------------- |
| 2 | +# Garage Garbage Day Reminders |
| 3 | +# Description: After either garage door opens on garbage day, play staggered reminders in the garage to take cans out. |
| 4 | +# |
| 5 | +# Schedule: 30s, 90s, and 180s after the door opens (skips if it isn't garbage day or the doors close). |
| 6 | +# Output: Uses Alexa announce in the garage so it plays locally (speech_engine is limited to Chromecasts inside). |
| 7 | +#------------------------------------------- |
| 8 | +- alias: 'Garage Garbage Day Reminders' |
| 9 | + id: 3f97f3be-3d0a-4d2d-9100-5b9c0dbfd5c3 |
| 10 | + mode: restart |
| 11 | + |
| 12 | + trigger: |
| 13 | + - platform: state |
| 14 | + entity_id: group.garage_doors |
| 15 | + from: 'closed' |
| 16 | + to: 'open' |
| 17 | + |
| 18 | + condition: |
| 19 | + # Only run on garbage days (Wed/Sun) |
| 20 | + - condition: template |
| 21 | + value_template: >- |
| 22 | + {% set day = now().strftime('%a') %} |
| 23 | + {{ day in ['Wed', 'Sun'] }} |
| 24 | +
|
| 25 | + action: |
| 26 | + - variables: |
| 27 | + reminder_delays: [30, 60, 90] # cumulative delays to hit 30s, 90s, 180s |
| 28 | + |
| 29 | + - repeat: |
| 30 | + for_each: "{{ reminder_delays }}" |
| 31 | + sequence: |
| 32 | + - delay: |
| 33 | + seconds: "{{ repeat.item }}" |
| 34 | + |
| 35 | + # Skip if the doors closed during the wait or it's no longer garbage day |
| 36 | + - condition: state |
| 37 | + entity_id: group.garage_doors |
| 38 | + state: 'open' |
| 39 | + |
| 40 | + - condition: template |
| 41 | + value_template: >- |
| 42 | + {% set day = now().strftime('%a') %} |
| 43 | + {{ day in ['Wed', 'Sun'] }} |
| 44 | +
|
| 45 | + - service: notify.alexa_media_garage |
| 46 | + data: |
| 47 | + message: >- |
| 48 | + {% set day = now().strftime('%a') %} |
| 49 | + Reminder: it's garbage day. {% if day == 'Wed' %}Both recycling and regular garbage go out today. {% endif %}Please take the cans to the curb before you leave. |
| 50 | + data: |
| 51 | + type: announce |
0 commit comments