Allow the Time of Day helper to use `sun` and add offsets

Excited to have the new Time of Day helper! The current dialog only allows for setting an actual time. I’d love to be able to configure the sun sensor and set offset from the dialog as well.

Here’s an example yaml I’m currently using that I can’t set in the new UI.

binary_sensor:
  - platform: tod #Time of Day
    name: Evening
    after: sunset
    after_offset: "-00:30"
    before: "23:59"

Plus one for this!

I’ve just set up binary sensors the same as yours and just did a post about it HERE

I’m sure it’s an oversight it’s missed out in the new helpers UI - I really need to base most of my automations around sun, rather than time.

1 Like

+1

It’s true that you can use sun triggers with sunrise and sunset options, with the plus of adding an offset.

But, that does not allow you to use other sun entities like midnight, noon, dawn, dusk, etc.

You can use a time trigger with any sun helper, but that doesn’t allow offset… Let’s say I have an automation that uses next setting with -20 minutes of offset as trigger… It’s not possible via the UI