How to change Aqara Motion Sensor is triggered once from one minute to every 5 seconds

Aqara Motion Sensor

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.

Product Model: RTCGQ11LM

Useful links
https://community.smartthings.com/t/making-xiaomi-motion-sensor-a-super-motion-sensor/139806

https://community.home-assistant.io/t/aqara-motion-sensor-hack-for-5-sec/147959/3

How to manually set state/value of sensor?

An AppDaemon app to reset Xiaomi Aqara motion sensors after a given timeout.
https://github.com/wernerhp/ha.appdaemon.aqara_motion_sensors

Step 1. check the results in Developer Tools/States
test ok

step 2.Home Assistant Python Script to force set an entity state

This script adds a service that lets you update the state and/or attributes of any entity, similar to the developer tools

you need to manually add the “python_scripts” folder to your config folder

Copy the Python script in to your /config/python_scripts directory.

Step 3. Enabled python_scripts: in your Home Assistant configuration

in configuration.yaml add:

python_script: 

source:https://github.com/xannor/hass_py_set_state

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

  1. Get the set_state.py python script
  2. Create “python_scripts” folder
  3. Save the script in config/python_scripts
  4. Add the line “python_script:” to your configuration.yaml
  5. 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]”.

Same problem, sensor settings are not saved when changed though the web UI of HA. Any solution here?