I would recommend to turn the automation off/on for turning off the Lights because, if you do not do this, and you for example turn manually the light on and walk into your motion sensor it will turn off the light(s). I have had this a few times.
* Add Xiaomi docs for platforms * Add service details * Add Aqara Wireless Switch * Escape templates * Update 'ha_iot_class'
* Create binary_sensor.xiaomi_gw.markdown Initial commit for binary_sensors sub-component of xiaomi_gw * Update binary_sensor.xiaomi_gw.markdown * Update binary_sensor.xiaomi_gw.markdown * Update binary_sensor.xiaomi_gw.markdown * Update binary_sensor.xiaomi_gw.markdown * Update binary_sensor.xiaomi_gw.markdown * Update binary_sensor.xiaomi_gw.markdown Updated automation examples Some other fixes * Update binary_sensor.xiaomi_gw.markdown * Update binary_sensor.xiaomi_gw.markdown * Update binary_sensor.xiaomi_gw.markdown * Minor changes