فهرست منبع

Relay switch with remote: use correct product id.

Expose inching control (experimentally)

- value is base64 encoded, seems to be always 4 char long
  (3 bytes after decoding) despite docs saying up to 255 char
- First byte is enable/disable switch, either 0 or 1.
- Second and third bytes seem to be number of seconds.
- Range unknown, but enabled up to 1 hour.  Max is 65535s if
  bytes do not extend further, which is short of 1 day, but
  long enough to represent 12 hours.

Issue #947
Jason Rumney 2 سال پیش
والد
کامیت
af03205359
1فایلهای تغییر یافته به همراه31 افزوده شده و 6 حذف شده
  1. 31 6
      custom_components/tuya_local/devices/relay_switch_remote.yaml

+ 31 - 6
custom_components/tuya_local/devices/relay_switch_remote.yaml

@@ -1,6 +1,6 @@
 name: Relay switch
 products:
-  - id: bfab649367a583280dvytj
+  - id: 1aegphq4yfd50e6b
     name: 1-433
 primary_entity:
   entity: switch
@@ -14,9 +14,6 @@ primary_entity:
     - id: 43
       type: string
       name: cycle_time
-    - id: 44
-      type: string
-      name: inching
     - id: 49
       name: add_remote
       type: string
@@ -71,6 +68,34 @@ secondary_entities:
             value: sync
           - dps_val: button
             value: button
-
-
+  - entity: switch
+    name: Inching
+    category: config
+    icon: "mdi:reload"
+    dps:
+      - id: 44
+        type: base64
+        name: switch
+        mapping:
+          - mask: FF0000
+          - dps_val: 0
+            value: false
+            mask: FF0000
+          - dps_val: 1
+            value: true
+            mask: FF0000
+  - entity: number
+    name: Inching duration
+    category: config
+    icon: "mdi:reload"
+    dps:
+      - id: 44
+        type: base64
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 3600
+        mapping:
+          - mask: 00FFFF