Instead of having to do multiple conditions to compare the current time converted to a string or int to an input_datetime converted to a string or int:
- condition: template
value_template: "{{ now().strftime('%H%M%S') | int >= states('input_datetime.start_time') | replace(':', '') | int }}"
- condition: template
value_template: "{{ now().strftime('%H%M%S') | int <= states('input_datetime.finish_time') | replace(':', '') | int }}"
Umm, I don’t know if I’m missing something here but as per the time conditions in the docs you linked to, you can just put the input datetime directly into the time conditions before and after keys without requiring a template.
Anything more than that is a template condition anyway, which has also been ‘shorthanded’ to reduce the amount of code required.
Your first example would be
- condition: time
after: input_datetime.start_time
before: input_datetime.finish_time
And your second is covered by that too, but if you actually did need a template it would simply be