IKEA motion sensor

You can do all that in one go using a Change node configured like this
image
That JSONata expression tests msg.payload.occupancy and if it is true sets the payload to ON, otherwise it sets it to OFF.

For future reference when you posting a flow do it as described in this post so that it is importable.