Skip to content

Commit

Permalink
Merge pull request #1145 from dixon777/add_yeelight_light_strip
Browse files Browse the repository at this point in the history
Add Yeelight Mesh Light Strip C1
  • Loading branch information
AlexxIT authored Sep 20, 2023
2 parents 74bb69b + 7f4a704 commit 60b39a0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions custom_components/xiaomi_gateway3/core/converters/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2543,6 +2543,28 @@
enabled=False), # Tested
BoolConv("flex_switch", "switch", mi="3.p.4", enabled=False), # uint8 # Tested
],
}, {
# https://home.miot-spec.com/spec/yeelink.light.stripf
# Following attributes are copied from lemesh.light.wy0c08 because they are similar
4896: ["Yeelight", "Mesh Light Strip C1", "yeelink.light.stripf"],
"spec": [
Converter("switch", "switch", mi="2.p.1"), # bool
BrightnessConv("brightness", mi="2.p.2", parent="light", max=100),
ColorTempKelvin("color_temp", mi="2.p.3", parent="light", mink=3000, maxk=6400),
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"
}),
Converter("flex_switch", "switch", mi="2.p.6", enabled=False), # uint8
MapConv("power_on_state", "select", mi="2.p.7", map= {0: "default", 1: "on"},
enabled=False),

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"),
# And more...
]
}, {
"default": "mesh", # default Mesh device
"spec": [
Expand Down

0 comments on commit 60b39a0

Please sign in to comment.