#Setting the percentage of water filter usage

1 messages · Page 1 of 1 (latest)

chilly gyro
#

Hi. I'm just starting out and I'd like to ask you because chat gpt isn't working for me.

I have three 4Swiss filters. Each has a different expiration date.

I want a nice tab on the dashboard with a graphical bar or a nice interface (maybe a mushroom card) showing how much time is left until the filter needs to be replaced, and a button that resets the time when held down for every filter.

The time will be different for each filter: 90, 180, and 360 days.

How do I do this easily?
I'd appreciate an explanation.

plain yarrow
#

what is the format of the sensor? Does it show the absolute datetime format as a state? Can you show the state value of these 3 sensors, that you can find in developer tools -> states ?

chilly gyro
#

Currently:

There are 3 helpers with data for 3 filters
I assigned each of them a date from this month

#

I wanted to add 3 helpers to count the % validity of filters so I can make a slider in my dashboard from it
Helpers -> Template helper
But it shows "unknown" status

plain yarrow
#

In my case, it is like this:

{% set dt = states('input_datetime.fasting_started') %}
{{ dt }}
{{ [((now() | as_timestamp - dt | as_timestamp) // 86400), 100] | min | int }}