If the sensor exists it will be displayed as sensor.doorclosedelay because an entity_id is always shown in lowercase.
Confirm the sensor’s value is a number. If it’s not then the int filter cannot convert it to a number. The automation will then fail because you overlooked to supply int with a default value. For example, int(0) will return 0 if the supplied string cannot be converted to a number.
If the sensor does not exist then the automation will fail because int was not given a default value.
Let me know what you find after performing the steps in the suggested debugging procedure.
If everything seems normal (sensor exists and has a numeric value) then check the automation’s trace for additional clues.
So I get this error in the trace
Error: ValueError: Template error: float got invalid input ‘unknown’ when rendering template ‘{{ ‘00:{:02}:00’.format(states(‘sensor.DoorCloseDelay’) | float()) }}’ but no default was specified
Error: ValueError: Template error: float got invalid input ‘unknown’ when rendering template ‘{{ ‘00:{:02}:00’.format(states(‘sensor.DoorCloseDelay’) | float()) }}’ but no default was specified
refers to a template that doesn’t exist in the automation you posted above. It makes it more challenging to help you when the information presented to the public doesn’t accurately reflect what you are actually using.
An error is produced because the value of sensor.DoorCloseDelay is not a numeric string. The float filter is designed to convert numeric strings to numbers. If it receives a non-numeric string, it reports its default value if one has been specified. If no default value is specified, an error is reported.
Correct. float will report its default value if it cannot convert a string to a number. The same applies for the int filter.