There are many simple ways to connect digital inputs to standard home automation sensors.
Click on the picture to enlarge it