diff --git a/custom_templates/time.jinja b/custom_templates/time.jinja index ab3ba40..da890cf 100644 --- a/custom_templates/time.jinja +++ b/custom_templates/time.jinja @@ -109,4 +109,9 @@ {% macro next_twitch_stream() %} {{ custom_time('calendar.tony_s_twitch_schedule','week,day,hour') }} +{% endmacro %} + +{% macro time_diff(sensor) %} +{% set diff = (as_timestamp(now()) - as_timestamp(states(sensor))) | int %} +{{ diff }} {% endmacro %} \ No newline at end of file