New jinja template for current hours/minutes timestamp
This commit is contained in:
@ -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 %}
|
Reference in New Issue
Block a user