How to compare DateTimeType of the AstroBinding with "now"

Hello everyone,
I want to create a rule that is opening the blinds when I arrive home. However, it should not open the blinds when it is already dark outside.
To realize that a use the astrobinding (with SUN as a thing) and the following items:

DateTime NightStart {channel="astro:sun:7a324540:night#start"}

and then I use this comparision:

if (now.isAfter(NightStart))
{....}

but i get a type missmatch. How do I convert “NightStart” so that this works.
Thanks for your help

-sthiemt

I suggest you use this design pattern:

Good luck

As the author of the link Vincent posted I agree with his suggestion.

However, your specific problem in the code you posted includes:

I have a working solution, but it is deprecated. Maybe it helps you.

I hope someone can tell me the new format for my rule.