I have a light that I want to come on 20 minutes before sunset and go off at 22:00.
So I’ve been reading a lot of threads and looking at examples. I have some been successful with other rules in the .rules file.
I have added the Astro binding.
and added the following to the .rules file:
rule "Amber Light Sunset On"
when
Channel 'astro:sun:start:set#event' triggered START
then
sendCommand(zwave_device_16500637f6a_node2_switch_dimmer, 100)
end
rule "Amber Light Off at 22:00"
when
Time cron "0 0 22 1/1 * ? *"
then
sendCommand(zwave_device_16500637f6a_node2_switch_dimmer, OFF)
end
I have also created the following in the .things file:
astro:sun:home [ geolocation="xxxx,yyyyy,88", interval=60 ] {
Channels:
Type start : set#event [
offset=-20
]
Type start : rise#event [
offset=-20
]
}
(xxx, yyy replaced with my real coordinates)
I can’t tell from what I’ve read if this is all I need to make it work. My coordinates show up in the Astro Configuration. This makes me think it’s reading my .things file.
But the Astro thing (in HABMin) shows 71 channels, but none with the names I put in the thing file.
And, of course, I have to wait until sunset to see if it’s going to work…