『瀚思彼岸』» 智能家居技术论坛
标题:
xiaomi_gateway3接入设备改类型求助
[打印本页]
作者:
cokeii
时间:
2024-6-5 18:30
标题:
xiaomi_gateway3接入设备改类型求助
本帖最后由 cokeii 于 2024-6-5 18:31 编辑
买的智能射灯,品牌是wlg 接入ha后只能控制开关[attach]59987[/attach],我想和其他射灯一样可以控制色温
[attach]59990[/attach],
但是在xiaomi_gateway3.py加入了代码
[attach]59988[/attach]
重启后没变换 求大佬帮忙看看 万分感谢
[attach]59991[/attach][attach]59992[/attach][attach]59993[/attach]
作者:
gz234748157
时间:
2024-6-5 19:10
几个排查方向
- 删了`射灯1`实体,再重载Gateway3集成试试?
- 根据Gateway3文档
https://github.com/AlexxIT/XiaomiGateway3/wiki/Converters
,DEVICES后面不是`+=`而是`=`
- xiaomi_gateway3.py文件有没有放对位置?
- xiaomi_gateway3.py里有在文件头加上`from custom_components.xiaomi_gateway3.core.devices import *`吗?
- 看了一下文档(
https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:light:0000A001:wlg-wy0a01:1:0000C802
),亮度和范围都没写对。
试试看这个
from custom_components.xiaomi_gateway3.core.devices import *
DEVICES = [{
16108: ["WLG", "Smart Light", "wlg.light.wy0a01"],
"spec": [
BaseConv("light", "light", mi="2.p.1"),
BrightnessConv("brightness", mi="2.p.2", max=100),
ColorTempKelvin("color_temp", mi="2.p.3", mink=2700, maxk=6500),
],
}] + DEVICES
作者:
cokeii
时间:
2024-6-8 10:38
gz234748157 发表于 2024-6-5 19:10
几个排查方向
- 删了`射灯1`实体,再重载Gateway3集成试试?
强强强 可以了 去掉+号可以了
作者:
cokeii
时间:
2024-6-8 17:53
gz234748157 发表于 2024-6-5 19:10
几个排查方向
- 删了`射灯1`实体,再重载Gateway3集成试试?
https://github.com/AlexxIT/XiaomiGateway3/issues/1376
已经提交github了 感谢大神提供的技术支持
欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/)
Powered by Discuz! X3.5