Ruuvi tag

Can you make Ruuvi tag connect to available devices?
When the tag is connected, set the time for the device to work within 2 minutes,
but when the tag is not connected, the device connected to the tag stops working within 2 minutes

because I want Tag to be like a home user. For example, when a user enters the house, the light in the house will start working within the specified time, but when the user leaves the area or is not home within 2 minutes, turn off the light automatically.

Can you write a command here?