21.10.0 now warns you when you misuse many functions that, in previous versions, just quietly let you make mistakes. Templating changes in 2021.10.0 - Breaking Change
For example, timestamp_custom expects to receive a timestamp but you supplied it with a string:
'00:00' | timestamp_custom('%H:%M', False)
00:00 is not a timestamp, it’s a string and in previous versions this mistake would be ignored and the result of timestamp_custom would simple be the string itself (i.e. it would ignore whatever pattern you supplied and simply pass the string as-is). Whatever you think you were trying to achieve with the timestamp_custom function, it wasn’t actually doing it.
2021.10.0 now flags mistakes like that (with a warning message). 2021.12.0 will cause an error message.
Yes. This computes the time-range that the current time falls into without requiring sensor.time.
{% set h = now().hour %}
{% set m = now().minute %}
{{'{:02d}{:02d}_to_{:02d}{:02d}'.format(h, 0 if m < 30 else 30, h if m < 30 else h+1 if h < 23 else 0, 30 if m < 30 else 0) }}
