Skip to content
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

Add support for Xiaomi hoto.light.lamp #1387

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions custom_components/xiaomi_gateway3/core/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3453,6 +3453,20 @@
ConstConv("action", mi="4.e.1", value=BUTTON_1_SINGLE),
ConstConv("action", mi="5.e.1", value=BUTTON_2_SINGLE),
]
}, {
# https://home.miot-spec.com/spec/hoto.light.lamp
9387: ["Xiaomi", "Multifunctional Camping Lantern", "hoto.light.lamp"],
"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=5000),
MathConv("color", "number", mi="2.p.4", min=1, max=16777215),
MapConv("mode", "select", mi="2.p.5", map={1: "Auto", 2: "Day", 3: "Color", 4: "Warmth", 5: "Leisure"}),
BaseConv("battery", "sensor", mi="3.p.1"),
MapConv("main_ charging_state", "sensor", mi="3.p.2", map={0: "Not Plug", 1: "Plug In"}),
MapConv("sub_ charging_state", "sensor", mi="3.p.3", map={0: "No Equipment", 1: "Charging", 2: "Full", 3: "Inserted Without Charge"}),
BoolConv("delay_switch", "switch", mi="4.p.1"),
MathConv("delay_time", "number", mi="4.p.2", min=1, max=60),
}, {
15082: ["Unknown", "Smart Quadruple Switch", "topwit.switch.rzw34"],
"spec": [
Expand Down
Loading