Skip to content

Instantly share code, notes, and snippets.

@davidino
Last active October 21, 2022 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidino/aa3719634ea788ba33099bdd8d246c63 to your computer and use it in GitHub Desktop.
Save davidino/aa3719634ea788ba33099bdd8d246c63 to your computer and use it in GitHub Desktop.
alias: Garbage bin reminder
description: ""
trigger:
- platform: time
at: "18:00:00"
condition:
- condition: time
before: "00:00:00"
weekday:
- wed
after: "00:00:00"
action:
- variables:
bin: empty
- choose:
- conditions:
- condition: state
entity_id: sensor.recycling
attribute: days
state: "1"
sequence:
- variables:
bin: "{{ sensor.recycling }}"
- conditions:
- condition: state
entity_id: sensor.wast_and_composte
attribute: days
state: "1"
sequence:
- variables:
bin: "{{ sensor.wast_and_composte }}"
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.bin_reminder
- repeat:
while:
- condition: state
entity_id: input_boolean.bin_reminder
state: "on"
sequence:
- service: notify.internal_notification_group
data:
message: Hey Remember the {{ bin }} bin for tomorrow
title: Hey Remember the {{ bin }} bin for tomorrow
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment