time_diff macro

This commit is contained in:
2025-12-28 01:12:42 -05:00
parent f57c41868e
commit 6cddca76f7

View File

@@ -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 %}