Hey all, new to HA. I tried looking through forums and docs first but nothing I can find specifically addresses my desired outcome. Thank you for reading!
I want to have a dashboard devoted to multiple time-based reminders of when various things around the house need to be tuned-up/replaced (ex. HVAC Filter, Water Heater Tune-up, etc). I want each card on the dashboard to be a gauge (for color-coding/visualization) counting down to a specific date (6 months from now for the HVAC Filter, 3 months from now for the nursery air filter, etc). When I click on a gauge, I want a prompt (or something) to essentially ask me whether I have just replaced the filter, and if I confirm, it runs a script or something to update the countdown with a new date 6 months in the future.
I feel like every post I find addresses one aspect of what I want to do, but I canāt figure out how to marry everything together to achieve my desired outcome. Timers and countdowns are a non-starter because they reset when HA reboots. Is there a way to run a script that calculates a date 6 months in the future like:
Create an input_datetime hepler to store the date the thing should happen. Call it āfilter_change_dateā or something else (but you will have to change the template below).
Then create this template sensor:
configuration.yaml
template:
- sensor:
- name: Days to filter change
unique_id: days_filter_change
device_class: duration
state_class: measurement
unit_of_measurement: d
state: "{{ (states('input_datetime.filter_change_date')|as_datetime|as_local - now()).days }}"
You can then use sensor.days_to_filter_change in your gauge or to trigger reminder notification automations.
Now my issue is trying to figure out why I canāt get the hold interaction on the gauge I made to run an action to set the helperās date as a function of 180 days from now (see pic). Any thoughts?
Testing that code in the template editor successfully returns the value 01-06-2026, but I canāt figure out how to make a script actually input that into the helper. Thanks again for helping, much appreciated.
Actually try that in the card action first just to make sure. Iām almost certain the action does not support templates, but it might. If not then put it in a script.