Within one hour after it connects to the network (new network connection mode), the Aqara Motion Sensor is triggered once every 5 seconds. If it is not triggered within an hour, it automatically enters normal user mode. It is then triggered once every minute.
The Aqara Motion Sensor goes into sleep mode after it is triggered. One minute later, it can be triggered again. It might be in sleep mode when you were using it.
step 3.HA restart
then after that is done (and after a HA restart) you should be able to add it via HACS
Quick start
Get the set_state.py python script
Create “python_scripts” folder
Save the script in config/python_scripts
Add the line “python_script:” to your configuration.yaml
Create an automation that calls the service “python_script.set_state”, with the data “entity_id: [name of your sensor entity]” and “state: [desired state text]”.