Only a certain type of channel can be use to trigger a rule. These Channels represent an event that doesn’t have a meaningful state. For example, when you press a momentary button, the button isn’t ON afterward nor is it OFF afterward. The button doesn’t really have a state at all, it’s purely an event.
Items represent state. Therefore, it doesn’t really make sense to link a momentary button (for example) to an Item. Therefore, event type Channels can be used to trigger a rule directly without an Item’s involvement.
Thank you Rich & Erik for the explanation.
I will follow the link provided by Erik and found ‘event.eventype’ in rules which should fit.
Background of this all is the typical application ‘switch on light at sunset’ which is a thing event, combined with a zigbee button. Both result in the same result: Switch on the light.
If you are talking about Astro, you can also link one of the Sunset state Channels to a DateTime Item and trigger the rule using a “Time is Item” trigger. That would be a good way to do it if you need the sunset time for other purposes.
Tried that immediately. Tried to link an item to the channel “astro:sun:home:set#event (Trigger)”, but got error message that “No profile is available” for this channel" whatever ‘type’ I use.
You missed the part where I said “state Channels”.
Each solar event (e.g. Nautical Sunrise) has four Channels: start time, end time, duration, and range event. The first three can only be linked to Items. The event Channel cannot be linked to an Item.
Note that solar events have a length. They are not instants. They all have a start time and an end time. The event Channel will get START at the start time and END at the end time, meaning if you trigger a rule using this Channel, that rule will get triggered when solar event starts and then again when it ends.
If you want to change trigger the rule when sunset starts, link the Start Time Channel to the DateTime Item and use that Item to trigger the rule with a Time is Item trigger. If you want it to trigger at the end of sunset, use that Channel instead. Not you can also add offsets to the Channels so you can get 30 minutes before the start of nautical sunset, for example.
Thanks Rich for your explanation ( … and your patience ! )
I did that already: Linked astro:sun:home:set#start to a DateTime- Item and attached the rule to it.
And AFAIR, it was triggerd somewhere around midnight, when the new sunrise-/set is calculated.
Anway, I will wait tonight and see what will happen and will report tomorrow.