|
1602 | 1602 | ], |
1603 | 1603 | }, { |
1604 | 1604 | 5480: ["Linptech", "Wireless Button", "linp.remote.k9b1"], |
1605 | | - "spec": [ |
| 1605 | + "spec": [ |
1606 | 1606 | # mibeacon2 spec |
1607 | 1607 | BLEMapConv("action", "sensor", mi=4097, map={"000000": BUTTON_1_SINGLE, "000001": BUTTON_1_HOLD, "000002": BUTTON_1_DOUBLE}), |
1608 | 1608 | BLEByteConv("battery", "sensor", mi=18435, entity=ENTITY_LAZY), # uint8 |
1609 | 1609 | # miot spec |
1610 | 1610 | ConstConv("action", mi="2.e.1", value=BUTTON_1_SINGLE), |
1611 | 1611 | ConstConv("action", mi="2.e.2", value=BUTTON_1_DOUBLE), |
1612 | 1612 | ConstConv("action", mi="2.e.3", value=BUTTON_1_HOLD), |
1613 | | - BaseConv("battery", mi="3.p.1003"), |
| 1613 | + BaseConv("battery", mi="3.p.1003"), |
1614 | 1614 | ], |
1615 | 1615 | # "ttl": "6h" # battery every 6 hours |
1616 | 1616 | }, { |
|
1751 | 1751 | BaseConv("custom_no_motion_time", "sensor", mi="2.p.1053", entity={"units": UNIT_MINUTES, "icon": "mdi:timer"}), |
1752 | 1752 | # other sensors |
1753 | 1753 | MathConv("no_motion_duration", "sensor", mi="2.p.1024", entity={"enabled": False, "units": UNIT_SECONDS, "icon": "mdi:timer"}), |
1754 | | - BaseConv("battery", "sensor", mi="3.p.1003"), |
| 1754 | + BaseConv("battery", "sensor", mi="3.p.1003"), |
1755 | 1755 | ], |
1756 | 1756 | }, { |
1757 | 1757 | # https://home.miot-spec.com/spec/linp.sensor_occupy.es3 |
|
1793 | 1793 | ] |
1794 | 1794 | }, { |
1795 | 1795 | # MIOT https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:remote-control:0000A021:lemesh-ts10:1 |
1796 | | - 17658: ["LeMesh", "Remote Control TS10", "lemesh.remote.ts10"], |
| 1796 | + 17658: ["LeMesh", "Remote Control TS10", "lemesh.remote.ts10"], |
1797 | 1797 | "spec": [ |
1798 | 1798 | BaseConv("action", "sensor"), |
1799 | 1799 | # --- Handle directional button events using MapConv --- |
|
1802 | 1802 | 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,}), |
1803 | 1803 | # --- Knob operation --- |
1804 | 1804 | # First use a generic value, then determine direction via another sensor |
1805 | | - ConstConv("action", mi="5.e.1036", value="knob_rotate"), |
| 1805 | + ConstConv("action", mi="5.e.1036", value="knob_rotate"), |
1806 | 1806 | # The value of this sensor is a number: positive for right, negative for left rotation. |
1807 | 1807 | BaseConv("knob_rotation_amplitude", "sensor", mi="5.e.1036.p.2"), |
1808 | 1808 | # --- Combined operation events --- |
1809 | 1809 | # Both "Down Button Press Right/Left Rotation" and "Press To Turn Right/Left" correspond to eiid: 1028 |
1810 | 1810 | ConstConv("action", mi="5.e.1028", value="button_3_press_rotate"), |
1811 | 1811 | # --- Battery level support --- |
1812 | 1812 | BaseConv("battery", "sensor", mi="1.p.1"), |
1813 | | - ] |
| 1813 | + ] |
1814 | 1814 | }, { |
1815 | 1815 | 16191: ["GranwinIoT", "V5 One Key Switch (BLE)", "giot.remote.v51kwm"], |
1816 | 1816 | "spec": [ |
|
3844 | 3844 | ConstConv("action", mi="13.e.3", value=BUTTON_2_HOLD), |
3845 | 3845 | MapConv("left_switch_mode", "select", mi="2.p.2", map={0: "Normal", 1: "Wireless", 2: "Flex", 3: "Toggle", 4: "Normal+Wireless"}), |
3846 | 3846 | MapConv("right_switch_mode", "select", mi="3.p.2", map={ 0: "Normal", 1: "Wireless", 2: "Flex", 3: "Toggle", 4: "Normal+Wireless"}), |
3847 | | - MapConv("power_on_state_left_switch", "select", mi="2.p.3", map={0: "Off", 1: "On", 2: "Default"}), |
| 3847 | + MapConv("power_on_state_left_switch", "select", mi="2.p.3", map={0: "Off", 1: "On", 2: "Default"}), |
3848 | 3848 | MapConv("power_on_state_right_switch", "select", mi="3.p.3", map={0: "Off", 1: "On", 2: "Default"}), |
3849 | 3849 | MapConv("left_switch_indicator_light_mode", "select", mi="16.p.1", map={0: "Follow", 1: "Opposite", 2: "Off", 3: "On"}), |
3850 | 3850 | MapConv("right_switch_indicator_light_mode", "select", mi="16.p.2", map={0: "Follow", 1: "Opposite", 2: "Off", 3: "On"}), |
3851 | | - BaseConv("ambient_light", "switch", mi="17.p.1"), |
| 3851 | + BaseConv("ambient_light", "switch", mi="17.p.1"), |
3852 | 3852 | ] |
3853 | 3853 | }, { |
3854 | 3854 | 16366: ["SmartFrog", "V6 Triple Wall Switch", "giot.switch.v63ksm"], |
|
3870 | 3870 | MapConv("middle_switch_mode", "select", mi="3.p.2", map={0: "Normal", 1: "Wireless", 2: "Flex", 3: "Toggle", 4: "Normal+Wireless"}), |
3871 | 3871 | MapConv("right_switch_mode", "select", mi="4.p.2", map={ 0: "Normal", 1: "Wireless", 2: "Flex", 3: "Toggle", 4: "Normal+Wireless"}), |
3872 | 3872 | MapConv("power_on_state_left_switch", "select", mi="2.p.3", map={0: "Off", 1: "On", 2: "Default"}), |
3873 | | - MapConv("power_on_state_middle_switch", "select", mi="3.p.3", map={0: "Off", 1: "On", 2: "Default"}), |
| 3873 | + MapConv("power_on_state_middle_switch", "select", mi="3.p.3", map={0: "Off", 1: "On", 2: "Default"}), |
3874 | 3874 | MapConv("power_on_state_right_switch", "select", mi="4.p.3", map={0: "Off", 1: "On", 2: "Default"}), |
3875 | 3875 | MapConv("left_switch_indicator_light_mode", "select", mi="16.p.1", map={0: "Follow", 1: "Opposite", 2: "Off", 3: "On"}), |
3876 | 3876 | MapConv("middle_switch_indicator_light_mode", "select", mi="16.p.2", map={0: "Follow", 1: "Opposite", 2: "Off", 3: "On"}), |
3877 | 3877 | MapConv("right_switch_indicator_light_mode", "select", mi="16.p.3", map={0: "Follow", 1: "Opposite", 2: "Off", 3: "On"}), |
3878 | | - BaseConv("ambient_light", "switch", mi="17.p.1"), |
| 3878 | + BaseConv("ambient_light", "switch", mi="17.p.1"), |
3879 | 3879 | ] |
3880 | 3880 | },{ |
3881 | 3881 | 20809: ["LeMesh", "Scene Wireless Button S", "lemesh.remote.ts00"], |
|
3887 | 3887 | BaseConv("battery", "sensor", mi="4.p.1003"), |
3888 | 3888 | MapConv("button_mode", "select", mi="5.p.1020", map={0: "Quick Single Click", 1: "Multiple Click"}), |
3889 | 3889 | ] |
3890 | | -}, { |
| 3890 | +}, { |
3891 | 3891 | 9609: ["Bean", "Mesh Single Wall Switch (L)", "bean.switch.bl01"], |
3892 | 3892 | "spec": [ |
3893 | 3893 | BaseConv("switch", "switch", mi="2.p.1"), |
|
4786 | 4786 | # MapConv("wireless_1", "select", mi="2.p.2", map={0: "Wired And Wireless", 1: "Wireless"}), # config |
4787 | 4787 | MapConv("power_on_state", "select", mi="2.p.5", map={1: "On", 2: "Off", 3: "Default"}), # config |
4788 | 4788 | # MapConv("wireless_2_1", "select", mi="2.p.6", map={0: "default", 1: "Wireless", 2: "Wireless", 3: "Wireless"}), # config |
4789 | | - MapConv("scene_speed", "select", mi="12.p.1", map={1: "Top Speed", 2:"Standard"}), #config |
| 4789 | + MapConv("scene_speed", "select", mi="12.p.1", map={1: "Top Speed", 2:"Standard"}), #config |
4790 | 4790 | BaseConv("led", "switch", mi="11.p.1"), # config |
4791 | 4791 | BaseConv("action", "sensor", entity=ENTITY_DISABLED), |
4792 | 4792 | ConstConv("action", mi="5.e.1", value=BUTTON_1_SINGLE), |
|
5080 | 5080 | BaseConv("switch_sensor_on", "switch", mi="11.p.1"), |
5081 | 5081 | MathConv("switch_sensor_mode", "number", mi="11.p.2", min=1, max=7200), |
5082 | 5082 | ], |
| 5083 | +}, { |
| 5084 | + # https://home.miot-spec.com/spec/giot.plug.v8icm |
| 5085 | + 21478: ["GranwinIoT", "Gra Electricity Metering Controller V8 (Mesh)", "giot.plug.v8icm"], |
| 5086 | + "spec": [ |
| 5087 | + BaseConv("switch", "switch", mi="2.p.1"), |
| 5088 | + MathConv("power_consumption", "sensor", mi="4.p.1", multiply=0.001, round=3, entity={"units": "kWh"}), |
| 5089 | + MathConv("electric_power", "sensor", mi="4.p.2", round=3, entity={"units": "W"}), |
| 5090 | + MathConv("voltage", "sensor", mi="4.p.3", multiply=0.001, round=2, entity={"units": "V"}), |
| 5091 | + MathConv("electric_current", "sensor", mi="4.p.4", multiply=0.001, round=3, entity={"units": "A"}), |
| 5092 | + # BaseConv("auxiliary_switch", "switch", mi="7.p.1"), |
| 5093 | + # BaseConv("voice_disable", "switch", mi="7.p.2"), |
| 5094 | + # BaseConv("button_type", "sensor", mi="8.p.1"), |
| 5095 | + # BaseConv("action", "sensor"), |
| 5096 | + # ConstConv("action", mi="7.e.1", value="normal_mode"), |
| 5097 | + # ConstConv("action", mi="7.e.2", value="wireless_mode"), |
| 5098 | + # ConstConv("action", mi="7.e.3", value="jog_mode"), |
| 5099 | + # ConstConv("action", mi="7.e.4", value="follow_led"), |
| 5100 | + # ConstConv("action", mi="7.e.5", value="opposition_led"), |
| 5101 | + # ConstConv("action", mi="7.e.6", value="on_led"), |
| 5102 | + # ConstConv("action", mi="7.e.7", value="off_led"), |
| 5103 | + # ConstConv("action", mi="7.e.8", value="local_timing_on"), |
| 5104 | + # ConstConv("action", mi="7.e.9", value="local_timing_off"), |
| 5105 | + # ConstConv("action", mi="7.e.10", value="cycle_timing_on"), |
| 5106 | + # ConstConv("action", mi="7.e.11", value="cycle_timing_off"), |
| 5107 | + # ConstConv("action", mi="7.e.12", value="led_config_on"), |
| 5108 | + # ConstConv("action", mi="7.e.13", value="led_config_off"), |
| 5109 | + # ConstConv("action", mi="7.e.14", value="overcharging_on"), |
| 5110 | + # ConstConv("action", mi="7.e.15", value="overcharging_off"), |
| 5111 | + # ConstConv("action", mi="7.e.16", value="mixed_mode"), |
| 5112 | + ], |
5083 | 5113 | }, { |
5084 | 5114 | 21145: ["PTX", "AK4 Pro Mesh2.0", "090615.switch.akpro4"], |
5085 | 5115 | "spec": [ |
|
5135 | 5165 | BaseConv("light", "light", mi="2.p.1"), |
5136 | 5166 | BrightnessConv("brightness", mi="2.p.2", max=100), |
5137 | 5167 | ColorTempKelvin("color_temp", mi="2.p.3", mink=3000, maxk=6500), |
5138 | | - BaseConv("flex_switch", "switch", mi="2.p.12", entity=ENTITY_CONFIG), |
| 5168 | + BaseConv("flex_switch", "switch", mi="2.p.12", entity=ENTITY_CONFIG), |
5139 | 5169 | MapConv("mode","select",mi="2.p.13", map={0: "None", 1: "Day", 2: "Night", 3: "Warmth", 4: "TV", 5: "Reading", 6: "Computer", 7: "Sleep", 8: "Wakeup"}), |
5140 | 5170 | ], |
5141 | 5171 | }, { |
|
0 commit comments