Bug in sun condition's "before_offset"?

I was testing the sun condition and noticed that the before: sunrise | before_offset: part doesn’t seem to care what sign is on its time value (but the after: sunset | after_offset: does seem to care what sign is on its time).

Not sure if it’s a bug or if I’m not implementing properly. My setup works fine, but just wanted to mention it.

#Condition beginning 30 min before sunset (and including after sunset): https://home-assistant.io/docs/scripts/conditions/#sun-condition
- condition: sun
  after: sunset
  after_offset: "-0:30:00"
#Condition ending 30 min after sunrise (and including before sunrise)
- condition: sun
  before: sunrise
  before_offset: "-0:30:00"
1 Like