Openhab Presence monitoring

Assuming all the information is held within the same message, you could do it with a switch node followed by a switch node. Or by using a function node with a javascript if this AND that type statement (google for the correct syntax)

If the information isn’t within the same message you need to get it there, you could use a join node, or store the data in memory. This has come up a lot in the past couple of days. There’s and example here Output two attributes in the template
and you can read the docs within the working with function part of the documentation