I’ve been working on some rules and have noticed that my items that aren’t linked to a channel, don’t seem to have a valid lastUpdate time.
my items are created using the ‘+’ icon in PaperUI->Configuration->Items and assigned to a group called gPlaylists
I’m using JDBC mysql as a persistence service with
Items {
// persist all items once a day and on every change and restore them from the db at startup
* : strategy = everyChange, restoreOnStartup
}
my script
rule "Play Playlist"
when
Item gPlaylists received update
then
val playlist = gPlaylists.members.sortBy[lastUpdate].last as SwitchItem
...
end
always fails as the lastUpdate value of all my items is null.
If I change the group to a group of door Contacts linked to contact Things, it works fine. Is the lastUpdate filled in by a binding so if there is no binding, there is no lastUpdate?