Node Red Room aware Alexa voice commands

I copied from this thread to create room aware alexa commands
https://community.home-assistant.io/t/approaches-to-room-aware-voice-commands-for-alexa-with-node-red/165399

His example is for fans. I use it for lights, but no reason it won’t work for fans.
I’ll take a look at this logic when I’m at home tonight, curious how it works and what the differences are.