It’s possible but the GUI wont even let you enter in the quotes…
hmmm, it might be something else. I just created this for a test and I see in the LogBook that it was triggered but my light didn’t turn on…
I see. In that case, I don’t see anything suspicious in the automation. I would first double-check the automation is enabled and then check if I can turn the switch on/off using the UI or via the Services page.
I just tried this automation (based on yours but adapted for my environment) and it worked. You’re right, the Automation Editor doesn’t let you delimit the offset with quotes. I didn’t know that (I normally use a text editor). Using Visual Studio Code editor, I omitted the quotes and the automation triggered as expected (9 hours and 50 minutes before sunset). So, sorry about that, the ‘delimited offset’ was a red herring.
I would now focus my attention on ensuring the automation is enabled, then ensure the switch works using the UI and/or the Services page. If it does then the next step would be to confirm the host system’s clock is set correctly.