Skip to content

Commit cb55e46

Browse files
authored
Fix the following issues recorded in #1654 for proper functioning in the Xiaomi Gateway 3 integration.
Fix the following issues recorded in #1654 for proper functioning in the Xiaomi Gateway 3 integration.
1 parent 58fc607 commit cb55e46

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

custom_components/xiaomi_gateway3/core/devices.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,18 +1489,17 @@
14891489
BLEToothbrush("toothbrush", mi=16),
14901490
],
14911491
}, {
1492-
# MIOT https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:printer:0000A060:xiaomi-label:1
1493-
13566: ["Xiaomi", "Label printer", "MJBQDYJ1-WC","xiaomi.printer.label"],
1494-
"spec": [
1495-
MapConv("printer_state", "sensor", mi="2.p.1", map={ 0: "standby", 1: "working", 2: "complete", 3: "suspend"}),
1496-
BaseConv("copies", "sensor", mi="2.p.3"),
1497-
MapConv("paper_lack", "binary_sensor", mi="2.p.4", map={ True: "True", False: "False"}),
1498-
MapConv("cover_open", "binary_sensor", mi="2.p.5", map={ True: "True", False: "False"}),
1499-
MapConv("fault", "sensor", mi="2.p.6", map={ 0: "normal",1: "paper_lack", 2: "cover_open", 3: "overheat"}),
1500-
BaseConv("battery", "sensor", mi="3.p.1"),
1501-
MathConv("battery_low", "binary_sensor", mi="3.p.1", multiply=0.01, min=0, max=0.2 )
1502-
],
1503-
"ttl": 600
1492+
# MIOT https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:printer:0000A060:xiaomi-label:1
1493+
13566: ["Xiaomi", "Label printer", "MJBQDYJ1-WC", "xiaomi.printer.label"],
1494+
"spec": [
1495+
MapConv("printer_state", "sensor", mi="2.p.1", map={0: "standby", 1: "working", 2: "complete", 3: "suspend"}),
1496+
BaseConv("copies", "sensor", mi="2.p.3"),
1497+
MapConv("paper_lack", "binary_sensor", mi="2.p.4", map={1: True, 0: False}),
1498+
MapConv("cover_open", "binary_sensor", mi="2.p.5", map={1: True, 0: False}),
1499+
MapConv("fault", "sensor", mi="2.p.6", map={0: "normal", 1: "paper_lack", 2: "cover_open", 3: "overheat"}),
1500+
BaseConv("battery", "sensor", mi="3.p.1"),
1501+
],
1502+
"ttl": "10m"
15041503
}, {
15051504
1249: ["Xiaomi", "Magic Cube", "XMMF01JQD", "jiqid.robot.cube"], # 4097
15061505
"spec": [

0 commit comments

Comments
 (0)