From 63df17bd195f56ad37fd5e1d6b517e37bc371201 Mon Sep 17 00:00:00 2001 From: ABUAIJUTIE Date: Thu, 31 Aug 2023 03:35:51 -0500 Subject: [PATCH] Add support for lemesh.light.wy0c15 https://home.miot-spec.com/spec/lemesh.light.wy0c15 --- .../xiaomi_gateway3/core/converters/devices.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/custom_components/xiaomi_gateway3/core/converters/devices.py b/custom_components/xiaomi_gateway3/core/converters/devices.py index 0f8f4c38..f94b6d1b 100644 --- a/custom_components/xiaomi_gateway3/core/converters/devices.py +++ b/custom_components/xiaomi_gateway3/core/converters/devices.py @@ -1695,6 +1695,23 @@ MapConv("dimming", "select", mi="4.p.3", map={0: "Gradient", 1: "Immediately"}), BoolConv("night_light", "switch", mi="4.p.5"), ] +}, { + # https://home.miot-spec.com/spec/lemesh.light.wy0c15 + 13525: ["LeMesh", "Mesh Light", "lemesh.light.wy0c15 "], + "spec": [ + Converter("light", "light", mi="2.p.1"), + BrightnessConv("brightness", mi="2.p.2", parent="light", max=100), + ColorTempKelvin("color_temp", mi="2.p.3", parent="light", mink=2700, maxk=6500), + MapConv("mode", "select", mi="2.p.5", map={ + 0: "WY", 4: "day", 5: "night", 8: "TV", 9: "reading", 10: "computer", + 11: "hospitality", 12: "entertainment", 13: "wakeup", 14: "dusk", + 15: "sleep" + }), + MapConv("power_on_state", "select", mi="2.p.7", map={0: "default", 1: "on"}), + BoolConv("save_state", "switch", mi="4.p.2"), + MapConv("dimming", "select", mi="4.p.3", map={0: "Gradient", 1: "Immediately"}), + BoolConv("night_light", "switch", mi="4.p.5"), + ] }, { # https://home.miot-spec.com/spec/jymc.light.falmp 10729: ["Unknown", "Mesh Light", "jymc.light.falmp"],