This is one of the basics of voice commands. Turn the lights on should do so in the area, not the whole house. If you want to build your own automation, including to derect a reply back, you need to know where it came from (but I think it should be an entity_id, not a device_id).
This feature request is similar to:
At post #10 you can see assist is already area aware, I just do not know if you can get the area in automations triggered by voice.