Lights on at Sunset

I’m trying to setup OpenHAB to switch on my living room lights at Sunset. Using the examples on the forum I thought I it would be straight forward, however that’s not the case for me anyway.

Here’s my configuration.
Dimmer Floor_Lamp “Floor Lamp” (Living_Room,Lights) { hue=“1” }
Switch Table_Lamp “Table Lamp” (Lights,Living_Room) { zwave=“14:command=SWITCH_BINARY” }

Frame label=“Ground Floor” {
Group item=Living_Room label=“Living Room” {
Frame label=“Lights” {
Slider item=Floor_Lamp label="Floor Lamp"
Switch item=Table_Lamp label=“Table Lamp”

Frame label=“Weather” {
Group item=Weather label=“Weather” {
Text item=Sunrise_Time
Text item=Sunset_Time
Text item=Season_Name

rule "Living Room Lights on @ Sunset"
Item Sunset_Time received update ON

Where have I gone wrong? Also what changes do I need to make so that my living room lights come on 20 minutes before sunset?

Thanks in advance.



Yes I’m using Astro.

DateTime Sunset_Time “Sunset [%1$tH:%1$tM]” (Weather) { astro=“planet=sun, type=set, property=end” }

Yes that helps, but I’m not sure who I would incorporate that into my rule.

I’m still having an issue with this. My lights are coming on at the wrong time of day. Reviewing the logs they were switched on at 05:52 this morning, which is about 12 hours from when they should switch on. I tried to add the offset of -720 which I believe is 12 minutes before the sunset time.

Any further help would be very much appreciated.