Change background 30 min before and after sunset?

Hi guys.
I created a watchface where a different image is shown if the sun has set or not, using $#DISDAYTIME#=true?100:0$.
I wanted to add the option to set a particular image to appear 30 minutes before the sunset and disappear 30 minutes after. (maybe even 30 minutes befure sunrise and 3 hours after!) I don’t understand what to use, maybe #WSUNRISE24#?

Thanks for the help!

1 Like

(#WRH#+(#WRm#/60)) gives you hour of a sunrise with minutes parts
(#WSH#+(#WSm#/60)) gives you hour of sunset with minutes parts

To each add and subtract 0.5 (30 minutes but in hour scale) and use one with subtraction as a condition for appearing and one with subtraction for disappearing.

1 Like

so it would be something like
$ #DH#>((#WRH#+(#WRm#/60))-0.5) && (#DH#>((#WRH#+(#WRm#/60))+0.5))?100:0$
but I should maybe do that also with #DH#?

#DH# give you hour without its parts.
Use this:
(#DH#+(#Dm#/60))

Hey, so I’m a bit new to facer, this conversation seems very helpful and very similar to what I am trying to achieve. The problem is that I cannot figure out how these codes fit together to achieve the correct effect.

So my variation is slightly different, I want an object to appear for the 1/2 hour before sunrise and again for the 1/2 hour after sunset. Then another object to appear for the 1/2 hour following sunrise and the 1/2 hour before sunset. I can’t figure out the proper codes to achieve this, can you help? Thanks in advance!