I have motion detection setup up to activate a light but would like for this to only happen from 30m before sunset until dawn (no activation during the day basically).
I cant seem to get my head around it…
Is this right?
condition: sun
before: sunrise
after: sunset
after_offset: '-00:30:00'
Yes that is correct. That condition will only evaluate to true when it is between sunset minus 30 minutes and sunrise. I.e. just before the sun goes down until the sun comes up again.
Although I will note from personal experience, be careful with that automation if that light is in a bedroom, next to a bedroom or on the way to a bathroom that sleepy people sometimes use in the middle of the night