Run vacuum after 5 days idle?

Maybe this will help get you on the right track, sorry on phone and can’t be more specific!

{% set elapsed = (as_timestamp(states('sensor.date_time').replace(',','')) - as_timestamp(states.sensor['6900_kitchen_hvac_action'].last_changed| default(0)) | int ) %}
        {% set days = (elapsed / 86400) | int %}

Also, this thread: The EPIC Time Conversion and Manipulation Thread!

1 Like