WTH can't I use templates in the Times of Day integration?

Wouldn’t it be awesome if we could use the value of time helpers as “before” and/or “after” values on the Times of Day integration?? It would greatly simplify many of my automations!!

Vote if you agree!

Could you give an example of why you need this?

The time trigger can take a time in an input_datetime directly.

How is having another intermediate integration (TOD) simplifying things?

Woops totally missed your reply. I wouldn’t use TOD as a time trigger.
For example, I want to set that between 4:30pm and 7:30pm is “Evening”, but I find it cumbersome to have to change the TOD integration whenever I want to move this time to say 4:45pm and 7:45pm. Allowing the TOD integration to take the value of helpers, I can display those helpers on the dashboard and click buttons to change the time window accordingly.

Besides the reason above, it’s just very cool to be able to use templates whenever possible.

Thanks for taking the time to respond!

What do you use it for though?

And why do you have to change it so often. Usually evening hours don’t change.

I’m not discounting your idea, just trying to understand it.

I’m afraid I don’t get it either.

If you want to use templates to make a binary sensor, just use a Template binary sensor based on your helpers… there’s no point putting TOD in the middle.

1 Like

Home Assistant is my thermostat and it runs the HVAC in the house.

The termostat (Home Assistant) looks a the value of certain temperature sensors in the house and it chooses which sensors to “pay attention to” based on the TOD. For example, I only care about the temperature in the living room during the day, whereas at night I only care about the temperature in the bedrooms.

I change the evening hours for example based on my kids’ schedule, which varies throughout the year, and also the season.

So I thought it would be great if Home Assistant provided an interface (easy to use, available to non-admins like my wife) to change the start and end times of a TOD sensor instead of having to change the configuration of the TOD sensor.

The times of day IS a binary sensor, I wouldn’t want to create another binary sensor. I would like to use the simplicity of a TOD sensor that can take “sunset” as a value (instead of having to calculate when sunset is separately) combined with easily configurable time parameters via time helpers which can be exposed to and configured through the dasboard.

The Schedule helper may be a better fit for this. You can edit the schedules from the frontend and it has a binary state like TOD. The only thing it can’t do is sunrise/sunset, just times.

It’s what I use for my heating automations:

1 Like