AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.38k stars 328 forks source link

please add support for yankon.light.ykmesh #1386

Open will-huang9531 opened 2 weeks ago

will-huang9531 commented 2 weeks ago

Gateway3 doesn't support this ble-mesh light,it‘s recognized as a switch. I tried writing the converter myself, but it didn't work. miot-spec is here https://home.miot-spec.com/spec/yankon.light.ykmesh I need your help!

will-huang9531 commented 2 weeks ago

this is my converter, I don't know what's wrong with it. Dose someone can help me check it?

from custom_components.xiaomi_gateway3.core.devices import *

DEVICES = [{ "yankon.light.ykmesh": ["yankon", "Mesh Light", "yankon.light.ykmesh"], "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

will-huang9531 commented 2 weeks ago

This converter has been tested and is now useable https://home.miot-spec.com/spec/yankon.light.ykmesh @AlexxIT

from custom_components.xiaomi_gateway3.core.devices import *

DEVICES = [{ 20066: [None, "Mesh Light", "yankon.light.ykmesh"], "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), MapConv("mode", "select", mi="2.p.7", map={0: "none", 1: "warmth", 2: "tv", 3: "reading", 4: "computer", 5: "hospitality", 6: "entertainment", 7: "lighting", 8: "night light"}), MapConv("power_on_state", "select", mi="2.p.7", map={0: "default", 2: "on"}), # config ], }] + DEVICES

dythebs commented 1 week ago

same problem