Skip to content

Commit

Permalink
Add support cxw-ble006 #1303
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Mar 24, 2024
1 parent d5e0912 commit 208ca11
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions custom_components/xiaomi_gateway3/core/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,19 @@
ConstConv("action", mi="2.e.1013", value=BUTTON_DOUBLE),
ConstConv("action", mi="2.e.1014", value=BUTTON_HOLD),
]
}, {
# https://github.com/AlexxIT/XiaomiGateway3/pull/1303
17825: ["Unknown", "Eight scene knob switch", "cxw.remote.ble006"],
"spec": [
BaseConv("battery", mi="7.p.1003"), # uint8
BaseConv("action", "sensor"),
MapConv("action", mi="5.e.1012.p.1", map={1: BUTTON_1_SINGLE, 2: BUTTON_2_SINGLE, 3: BUTTON_3_SINGLE, 4: BUTTON_4_SINGLE, 5: "button_5_single", 6: "button_6_single", 7: "button_7_single", 8: "button_8_single"}),
MapConv("action", mi="5.e.1013.p.1", map={1: BUTTON_1_DOUBLE, 2: BUTTON_2_DOUBLE, 3: BUTTON_3_DOUBLE, 4: BUTTON_4_DOUBLE, 5: "button_5_double", 6: "button_6_double", 7: "button_7_double", 8: "button_8_double"}),
MapConv("action", mi="5.e.1014.p.1", map={1: BUTTON_1_HOLD, 2: BUTTON_2_HOLD, 3: BUTTON_3_HOLD, 4: BUTTON_4_HOLD, 5: "button_5_hold", 6: "button_6_hold", 7: "button_7_hold", 8: "button_8_hold"}),
ConstConv("action", mi="5.e.1036", value="rotate"),
BaseConv("rotate", mi="5.e.1036.p.2"),
],
"ttl": "6h" # battery every 6 hours
}, {
# BLE devices can be supported witout spec. New spec will be added "on the fly" when
# device sends them. But better to rewrite right spec for each device
Expand Down

0 comments on commit 208ca11

Please sign in to comment.