New jinja template for current hours/minutes timestamp

This commit is contained in:
2023-04-22 21:10:20 -04:00
parent b2ea95cdd0
commit b62e8f6a24
3 changed files with 14 additions and 5 deletions

View File

@ -24,4 +24,8 @@
{% macro read_time_from_calendar(calendar,start_or_end) %}
{{ as_timestamp(strptime(state_attr(calendar,start_or_end), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%I:%M %p") }}
{% endmacro %}
{% macro ct() %}
{{ ((now().hour * 60 + now().minute) * 60 ) }}
{% endmacro %}