FR. add offset to time condition

please consider adding the option of an offset to the time condition:

there is a WTH, but given the WTH season is now closed, let me ‘formally’ open this FR for that.

  - alias: "Example referencing a time helper"
    condition: time
    before: 23:00
    after: input_datetime.alarmclock_wd
    offset: -00:30

would be so helpful, making those time conditions be dynamic.

allowing an entity in the offset would even be better:

  - alias: "Example referencing a time helper"
    condition: time
    before: 23:00
    after: input_datetime.alarmclock_wd
    offset: input_number.alarmclock_offset

use case

got a boiler I need to heat as close to the wakeup as possible, and the alarm clock changes frequently. can hard code only now

      - condition: time
        before: '23:00'
        after: '06:00'

but that is rather sub-optimal

There are two times so wouldn’t there be a need for two offsets?

before_offset
after_offset

Maybe it could be done per option:

  - alias: "Example referencing a time helper"
    condition: time
    before: input_datetime.sleeptime
    offset: 00:15
    after: input_datetime.alarmclock_wd
    offset: -00:30

but if not, your solution would be best probably

I used the same offset naming scheme as in the Sun Trigger (edit: Sunrise/Sunset Condition).

1 Like

really sorry but I dont understand what your are saying, those offset names are not documented at Automation Trigger - Home Assistant ?

Oops! My mistake.

I should have said Sunrise/Sunset Condition.

Yes! That is nice indeed, sorry I didn’t connect that myself.