Skip to content

Commit 7eca94d

Browse files
authored
Merge pull request #1387 from ABUAIJUTIE/master
Add support for Xiaomi hoto.light.lamp
2 parents b964392 + 4ea704f commit 7eca94d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

custom_components/xiaomi_gateway3/core/devices.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3453,6 +3453,20 @@
34533453
ConstConv("action", mi="4.e.1", value=BUTTON_1_SINGLE),
34543454
ConstConv("action", mi="5.e.1", value=BUTTON_2_SINGLE),
34553455
]
3456+
}, {
3457+
# https://home.miot-spec.com/spec/hoto.light.lamp
3458+
9387: ["Xiaomi", "Multifunctional Camping Lantern", "hoto.light.lamp"],
3459+
"spec": [
3460+
BaseConv("light", "light", mi="2.p.1"),
3461+
BrightnessConv("brightness", mi="2.p.2", max=100),
3462+
ColorTempKelvin("color_temp", mi="2.p.3", mink=2700, maxk=5000),
3463+
MathConv("color", "number", mi="2.p.4", min=1, max=16777215),
3464+
MapConv("mode", "select", mi="2.p.5", map={1: "Auto", 2: "Day", 3: "Color", 4: "Warmth", 5: "Leisure"}),
3465+
BaseConv("battery", "sensor", mi="3.p.1"),
3466+
MapConv("main_ charging_state", "sensor", mi="3.p.2", map={0: "Not Plug", 1: "Plug In"}),
3467+
MapConv("sub_ charging_state", "sensor", mi="3.p.3", map={0: "No Equipment", 1: "Charging", 2: "Full", 3: "Inserted Without Charge"}),
3468+
BoolConv("delay_switch", "switch", mi="4.p.1"),
3469+
MathConv("delay_time", "number", mi="4.p.2", min=1, max=60),
34563470
}, {
34573471
15082: ["Unknown", "Smart Quadruple Switch", "topwit.switch.rzw34"],
34583472
"spec": [

0 commit comments

Comments
 (0)