-
Notifications
You must be signed in to change notification settings - Fork 910
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
[Bug]: 对于二元传感器应使用binary sensor类 #206
Labels
enhancement
New feature or request
Comments
说的很对,gateway3集成就是用的binary sensor类,很轻松就可以接入homekit |
人体,人在,门窗等这些,请检查一下改用binary sensor,否则无法用的。 |
micturkey
added a commit
to micturkey/ha_xiaomi_home
that referenced
this issue
Dec 19, 2024
…ak sensor fix: use Binary sensor class for door&windows and water leak sensor The original version uses a sensor class for various sensors, such as door and windows sensors, water leak sensors, occupancy sensors, motion sensors, etc., which prevents the HomeKit Bridge from generating corresponding entities. This fix is to use binary sensor class for door andwindows sensor and water leak sensor. Correspoding issue: XiaoMi#206
This was referenced Dec 19, 2024
值得重视额,人体存在传感器、门窗传感器、水浸传感器都没有 binary sensor 类,希望可以改进一下 |
小米人在传感器通过homebridge到HomeKit还显示为不支持,不知道从sensor变成binary sensor是不是就会支持了? |
caibinqing
pushed a commit
to caibinqing/ha_xiaomi_home
that referenced
this issue
Jan 7, 2025
…ak sensor fix: use Binary sensor class for door&windows and water leak sensor The original version uses a sensor class for various sensors, such as door and windows sensors, water leak sensors, occupancy sensors, motion sensors, etc., which prevents the HomeKit Bridge from generating corresponding entities. This fix is to use binary sensor class for door andwindows sensor and water leak sensor. Correspoding issue: XiaoMi#206
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug / 描述问题
对于二元传感器建议使用binary sensor类
To Reproduce / 复现步骤
1.添加集成
2.查看移动传感器/门窗传感器类型
Expected behavior / 预期结果
2.为binary sensor
Home Assistant Logs / 系统日志
无
Home Assistant Core version / Home Assistant Core 版本
2024.12.2
Home Assistant Operation System version / Home Assistant Operation System 版本
13.0
Xiaomi Home integration version / 米家集成版本
v0.1.2
Additional context / 其他说明
背景
当前插件中的传感器,全部转为了sensor类
ha_xiaomi_home/custom_components/xiaomi_home/miot/specs/specv2entity.py
Line 333 in 54e2637
其中对于bool类型定义通过以下文件转换显示
ha_xiaomi_home/custom_components/xiaomi_home/miot/specs/bool_trans.json
Line 2 in 54e2637
改进
HA官方支持binary sensor类型
https://developers.home-assistant.io/docs/core/entity/binary-sensor
建议对于二元传感器使用binary sensor类,也省却了翻译的问题,可以直接使用官方翻译
如移动传感器:
BinarySensorDeviceClass.MOVING
门窗传感器:
BinarySensorDeviceClass.OPENING
当前无法直接导入到homekit中,需要通过template进行转换;指定binary sensor类则可以直接导入使用。
The text was updated successfully, but these errors were encountered: