-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
support Xiaomi Occupancy(Human Presence) Sensor XMOSB01XS #91
Conversation
Support 2024 New battery based Xiaomi Mijia Occupancy (Human Presence) Sensor (XMOSB01XS) New test cases are added. Also verified by adding it to Home Assistant (with a small additional changes in xiaomi-ble component for additional new properties) Hardware Info: https://www.aliexpress.com/i/1005007104780534.html https://www.mi.com/shop/buy/detail?product_id=19994
def obj484e( | ||
xobj: bytes, device: XiaomiBluetoothDeviceData, device_type: str | ||
) -> dict[str, Any]: | ||
"""Occupancy-status: uint8: 0 - No One, 1 - Has One""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Occupancy-status: uint8: 0 - No One, 1 - Has One""" | |
"""Occupancy-status: uint8: 0 - Clear, 1 - Detected""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok~
@@ -80,3 +80,9 @@ class ExtendedSensorDeviceClass(BaseDeviceClass): | |||
|
|||
# Toothbrush score | |||
SCORE = "score" | |||
|
|||
# Has-Someone-Duration | |||
HAS_SOMEONE_DURATION = "has_someone_duration" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use something like
duration someone detected
and duration clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I added some small suggestions.
Please name your commit something like
feat: add occupancy sensor
All lower case letters. That should make the lint commit test pass
Support 2024 New battery based Xiaomi Mijia Occupancy (Human Presence) Sensor (XMOSB01XS)
New test cases are added.
Also verified by adding it to Home Assistant (with a small additional changes in xiaomi-ble component for additional new properties)
Hardware Info: