[OH2] Using time of astro binding for rules

I read the wiki pages and saw that there is a possibility to ask for Time is noon. So I tested it with the astro binding on OH2 via:

rule "Sunrise Roller"
when
    Time is astro_sun_45ded7eb_rise_start
then
    sendCommand(FGRM222_1_blinds_control, 0.0)
end

rule "Sunset Roller"
when
    Time is astro_sun_45ded7eb_set_end
then
    sendCommand(FGRM222_1_blinds_control, 82.0)
end

But it doesn’t work. Do you have any suggestions how to get it working? I’m looking for the easiest way to control my roller shutters this way.

Thanks!

I don’t think it works like that. I’m not completely up on OH 2 but I don’t think they changed how this works.

The Time is triggers are independent of the Astro binding. The only valid Time is rule triggers are Time is noon and Time is midnight.

In OH 1 the Astro binging used to be configurable to generate an event which could trigger a rule when a certain time occurs. However, this is incompatible with OH 2 and this behavior is being reimplemented in the core of OH 2, but is not yet implemented. So if you want to have Astro based events in OH 2 you have two choices, use the 1.x Astro binding with the OH 1 compatible layer or create a rule that triggers a little after midnight (Astro recalculates the times for the next day at midnight) and startup to create a Timer that triggers at the Astro generate time and sendCommand to some switch to trigger your rule.