What am I doing wrong here?

$#Dk#>#WRH#&&#Dk#<#WSH#?100:0$

I have expressions setup for the text to switch from sunrise to sunset and back just after the events. This expression leaves both on all the time however. I am new to Boolean operators so if someone can tall me what I’m doing wrong that would help.

I think I figured it out but it still doesn’t work on my huawei.

$#Dk#<=#WRH#?100:(#Dk#>=#WSH#?100:0)$

I think your issue might be in using #Dk# instead of #DH# as the sunrise and sunset hours are in 0-23 format, but your first formula seems to be closer.

I think your sunrise layer would be:
$#DH#>=#WRH#&&#DH#<#WSH#?100:0$