I have an automation which is really just an automated reminder to replace the air filter on my furnace, I have a counter with a maximum value of 30 and a minimum value of 0. The automation decrements the counter once every day at 7PM and when the counter reaches 0 instead of decrementing it should send me a notification to replace the filter (and would do so at that time every day until I reset the counter by either using the actionable button in the notification or by scanning the NFC tag I setup for the task).
The automation does decrement the counter as intended, but it doesn’t send the notification. I went in and manually triggered the notification to be sent it worked fine (just did it again while typing this out). YAML code for the automation is below.
I have another automation just like this which reminds me to fill my Cat’s auto feeder, which is slightly more complicated but it works like a charm. I can’t figure out why this wouldn’t work.
alias: Air Filter Reminder
description: Manages Air Filter Counter and notifies me when counter reaches 0.
trigger:
- platform: tag
tag_id: c018c53f-1c39-4f97-8fd0-022a6e0b4ad1
id: scan
- platform: time
at: "19:00:00"
id: Counter_Decrement
- platform: event
event_type: mobile_app_notification_action
event_data:
action: FILTER_REPLACED
id: Notify Response
condition: []
action:
- if:
- condition: or
conditions:
- condition: trigger
id: scan
- condition: trigger
id: Notify Response
then:
- service: counter.reset
data: {}
target:
entity_id: counter.air_filter
- if:
- condition: trigger
id: Counter_Decrement
then:
- choose:
- conditions:
- condition: state
entity_id: counter.air_filter
attribute: minimum
state: ""
sequence:
- service: notify.mobile_app_josh_phone
data:
message: Change Air Filter on Furnace
title: Change Filter
data:
actions:
- action: FILTER_REPLACED
title: Filter Replaced
- conditions:
- condition: not
conditions:
- condition: state
entity_id: counter.air_filter
attribute: minimum
state: ""
sequence:
- service: counter.decrement
data: {}
target:
entity_id: counter.air_filter
mode: single