You can’t use a Room Sensor that way (they only interface with the thermostat), but you can use a Climate Sensor (with limitations). Note the climate sensor requires the Hub, if you don’t already have one.
First restriction: A Rule using the climate sensor does not currently check the status of the sensor at the beginning of any time window. So don’t use a time window. Hopefully they will fix that. If a Rule uses a time window, the Rule needs to check the status of the sensor at the beginning of the window.
Second restriction: As near as I can tell, the system only checks the sensor at random times. I see checks that may be anywhere from a few minutes to an hour or two. If you have the sensor visible in the Home tab screen, or have it called up, it checks quite often. But not otherwise as near as I can tell. So no tight control. Hopefully they will fix that too. If a Rule based on the sensor is active, it needs to check every 10 minutes or so.