Sleep changes #91

This commit is contained in:
2023-08-08 16:36:10 -04:00
parent 534aac0076
commit a8da417340
4 changed files with 65 additions and 19 deletions

View File

@ -4,11 +4,19 @@
{{ (states(input_number)) | int * 60 }}
{% endmacro %}
{% macro current_time(hr) %}
{% macro current_time(hr,date) %}
{% if hr == 12 %}
{{ now().strftime('%-I:%M %p') }}
{% elif hr == 24 %}
{{ now().strftime('%H:%M') }}
{% if date is defined %}
{% if date == 'withdate' %}
{{ now().strftime('%Y-%m-%d %H:%M:%S') }}
{% elif date == 'nodate' %}
{{ now().strftime('%H:%M') }}
{% endif %}
{% else %}
{{ now().strftime('%H:%M') }}
{% endif %}
{% endif %}
{% endmacro %}