Motion Switch Recommendation Needed

Most community members are using two separate devices for this, one motion sensor and one smart switch. That’s because up until recently the radio devices that communicated with the smart things hub or generally not small enough to fit into a switch as well.

There is now one motion switch available as of late 2017 from GE, but most people still use two separate devices. That also allows you to place the motion sensor anywhere you want to in the room, which can make it more effective.

Or as @bobbles suggested you could just use a contact sensor on the door which might be more reliable than a motion sensor, but you would still need a smart switch as well.

Essentially the sensor sends a message to the smart things hub when the door is open and then the hub sent a message to the switch to turn on the light.

See the device class features FAQ. It discusses both sensors and light switches.

You could also use a smart bulb instead of the smart switch in this kind of configuration.

There is also one smart bulb intended for an overhead light fixture which does have a built-in motion sensor, but for whatever reason it never really seem to catch on. There are a number of non-networked bulbs which do have this feature, and some people just use those if you don’t need to connect it to the rest of your home automation.