[SOLVED] How to check if two items change in 5 seconds? (Presence detection + alexa)

It’s complaining about the arguments passed to a lambda. I recommend loading the file in VSCode to tell you which one it is complaining about. Then give those lambdas a type. I suspect it’s the map so you would use

.reduce[ String list, String name |

Well, some of this could be learned by looking at the language docs, like the map reduce filter forEach like stuff to do with Lists, but Design Pattern: Working with Groups in Rules is a little better than the official docs.

The timing issue has nothing to do with the language and everything to do with the timing and how OH itself works and you won’t find any docs that help you with that.

The best place to start is the OH Rules docs page. There is a link to the Xtend Docs on the Rules Doc page, so go there to review how to do things like the switch statement and such. Finally, review the Design Patterns for tested generic approaches to solve common problems.

1 Like