The Times of the Day helper, as I understand it, can only have have time or sunrise/sunset as value on before/after. It would be great if you could use input_datetime sensors as input value, so you could change the times from your dashboard.
Why not just use an input_datetime directly?