I created a sun condition in which I want to be true an hour before sunrise. Below is a screenshot of the condition in the visual editor and YAML. In the visual editor the offset is listed in the before sunrise section. But in YAML it is listed after the “after: sunset” line. I just wanted to confirm this is actually 1 hour before sunset.
The condition you have shown in the screenshot will be true from midnight to 1 hour earlier than Sunrise and from Sunset to midnight.
The “before” in before_offset is a reference to the before configuration variable that it modifies. It does not mean “before” in the sense of “earlier”… that is controlled by the use of a negative time value.
The docs for this condition include a graphic that shows examples of all the available combinations.