Hey all,
I have 2 sensors that tell me if the bins/recycling are due “tomorrow”
when this happens, i want a notification to remind me at 9pm the day it changes to “tomorrow”.
Question1: have i got the logic the correct way around? or should i trigger on the state and condition on the time? or doesn’t it matter?
question2; how do i dynamically have the notification tell me which condition kicked in? eg. is it “bin” or “recycling”
- alias: warn night before bins go out
id: warn_night_before_bins_go_out
trigger:
platform: time
at: '21:00:00'
condition:
- condition: or
conditions:
- condition: state
entity_id: sensor.recycling_bin_in_days
state: "Tomorrow"
- condition: state
entity_id: sensor.refuse_bin_in_days
state: "Tomorrow"
action:
- service: persistent_notification.create
data_template:
message: Bin test 3
title: Bin Test 3
- service: notify.notify
data_template:
message: Bin test 3
title: Bin test 3
- service: notify.alexa_media
data_template:
message: Bins are due tomorrow
data:
type: announce
method: speak
target: media_player.echo_show2_jamie_office