Hi there,

I’m wondering why this rule doesn’t trigger …

```
// THINGS
astro:sun:a-homeX "Astro: Sun-homeX" [ geolocation="5y.xxxx,8.xxxxx,10", interval=60 ] {
Channels:
Type rangeEvent : set#event [
latest="17:00"
]
}
```

```
// ITEMS
DateTime astro_sun_a_homeX_set_end "Sonnenuntergang X Ende [%1$tH:%1$tM]" <dastrosunset> (gM,Gastro) {channel="astro:sun:a-homeX:set#end"}
```

```
// RULE
rule "Rollladen AZD schliessen"
when
Channel 'astro:sun:a-homeX:set#event' triggered END
then
if (EG_az_r_SwitchDimmer.state < 100 && EG_az_r_MeterWatts.state < 20) {
EG_az_r_SwitchDimmer.sendCommand(ON)
}
else {
return
}
end
```

Approach: The rollershutter should close when sunset ends (which is today at 21:08). Due to the `latest`

statement in the channel definition it should trigger earlier today.

The condition `EG_az_r_SwitchDimmer.state < 100 && EG_az_r_MeterWatts.state < 20`

is used in order to avoid the rule firing when the rollershutter has already been closed or there is movement due to pushing the physical rollershutter switch.

Unfortunately the rule doesn’t work

Log for manual start of the rollershutter:

```
Item 'EG_az_r_SwitchDimmer' received command ON
EG_az_r_SwitchDimmer predicted to become ON
EG_az_r_SwitchDimmer changed from 0 to 100
EG_az_r_MeterWatts changed from 0 to 114
EG_az_r_SwitchDimmer changed from 100 to 10
EG_az_r_SwitchDimmer changed from 10 to 20
EG_az_r_SwitchDimmer changed from 20 to 30
EG_az_r_SwitchDimmer changed from 30 to 40
EG_az_r_SwitchDimmer changed from 40 to 50
EG_az_r_SwitchDimmer changed from 50 to 60
EG_az_r_SwitchDimmer changed from 60 to 70
EG_az_r_SwitchDimmer changed from 70 to 80
EG_az_r_SwitchDimmer changed from 80 to 90
EG_az_r_MeterWatts changed from 114 to 1
EG_az_r_MeterWatts changed from 1 to 0
EG_az_r_SwitchDimmer changed from 90 to 100
```

As one can see, `EG_az_r_SwitchDimmer`

and `EG_az_r_MeterWatts`

were both 0.

But something must be wrong …