FutureTense / keymaster

Home Assistant integration for managing Z-Wave enabled locks
MIT License
231 stars 43 forks source link

ISSUE: Template error in reset_codeslot script #233

Closed firstof9 closed 2 years ago

firstof9 commented 3 years ago

Describe the bug Template error in latest Home Assistant beta.

Environment (please complete the following information):

Logs

Template warning: 'timestamp_custom' got invalid input '00:00' when compiling template '{{ '00:00' | timestamp_custom('%H:%M') }}' but no default was specified. Currently 'timestamp_custom' will return '00:00', however this template will fail to render in Home Assistant core 2021.12

Screenshots n/a

Additional context Lines 85-92 in keymaster_common_child.yaml:

            - service: input_datetime.set_datetime
              data_template:
                entity_id: "input_datetime.{{ days[repeat.index - 1] }}_start_date_LOCKNAME_{{ code_slot | string }}"
                time: "{{ '00:00' | timestamp_custom('%H:%M') }}"
            - service: input_datetime.set_datetime
              data_template:
                entity_id: "input_datetime.{{ days[repeat.index - 1] }}_end_date_LOCKNAME_{{ code_slot | string }}"
                time: "{{ '00:00' | timestamp_custom('%H:%M') }}"

Likely similar in keymaster_common.yaml

FutureTense commented 2 years ago

This might be due to a change in core.

https://community.home-assistant.io/t/template-changes-i-dont-understand/344586/3

firstof9 commented 2 years ago

It was, I merged a fix for it tho.

FutureTense commented 2 years ago

I’m still getting the error in the log

nholben commented 2 years ago

Still getting this error.

Template warning: 'timestamp_custom' got invalid input '00:00' when compiling template '{{ '00:00' | timestamp_custom('%H:%M') }}' but no default was specified. Currently 'timestamp_custom' will return '00:00', however this template will fail to render in Home Assistant core 2022.1

firstof9 commented 2 years ago

Regenerate your files.