Invalid Trigger Definition for Astro Channel Item

I have now found the solution in a post from rlkoshak:

This is my working rule:

from core.rules import rule
from core.triggers import when

@rule("system_daylight", description="dummy_switch daylight", tags=["system", "dummy", "daylight"])
@when("Channel astro:sun:local:set#event triggered START")
@when("Channel astro:sun:local:rise#event triggered START")
def daylight(event):
  events.sendCommand("dummy_daylight", "ON" if "rise" in str(event.channel).split(":") else "OFF")