Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motion Sensor Occupancy Timeout #316

Open
JCalvi opened this issue Dec 10, 2024 · 1 comment
Open

Motion Sensor Occupancy Timeout #316

JCalvi opened this issue Dec 10, 2024 · 1 comment

Comments

@JCalvi
Copy link

JCalvi commented Dec 10, 2024

I have two Aqara P1 sensors connected via a flashed M2.
No matter what I set the Detection Interval to in the Aqara App in Home Assistant I see under the sensor attributes "Occupancy Timeout 90"

If I alter the line in binary_sensor.py self._default_delay = self.device.get(CONF_OCCUPANCY_TIMEOUT, 90) to say 30 and reload the integration then the attribute reports 30 instead of 90.

Should this read the setting from the Aqara Hub set via the App or is this setting OCCUPANCY_TIMEOUT not the same as "Detection Interval"?

If different it would be nice to have a way to set it from Home Assistant without having to alter the code that would get written over with each update.

Note that with in Homeassistant the same sensor connected via Homekit turns off after whatever the "Detection Interval" is set to, so if I set it to 10s then the sensor turns off in 10s.

In Aqara Gateway it turns off after OCCUPANCY_TIMEOUT, so if I set that to 30s in binary_sensor.py it turns off in 30s. I assume it would be the longer of the two being used so ideally OCCUPANCY_TIMEOUT should be set to "Detection Interval" which is what the Homekit version must be doing.

@JCalvi
Copy link
Author

JCalvi commented Dec 10, 2024

I since see that this is a repeat of: #281 (comment)
So I can set the value in configuration.yaml which is good, but still would be better if Aqaragateway could query the setting from the device.
Happy to help test this if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant