Fixes for summer vacation breaking K's morning scheduling

This commit is contained in:
2023-06-01 13:56:20 -04:00
parent 3f158d4d7b
commit ab9ed5ffd9
3 changed files with 45 additions and 44 deletions

View File

@ -27,7 +27,9 @@
{% endmacro %}
{% macro calendar_event_today(calendar) %}
{{ as_timestamp(strptime(state_attr(calendar,'start_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%Y-%m-%d") == now().strftime("%Y-%m-%d") }}
{% if state_attr(calendar,'start_time') %}
{{ as_timestamp(strptime(state_attr(calendar,'start_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%Y-%m-%d") == now().strftime("%Y-%m-%d") }}
{% endif %}
{% endmacro %}
{% macro set_time_from_calendar(calendar,start_or_end) %}