Просмотр исходного кода

Add a new type of smartplug with base64 encoded data on dps 101,102,103

I think these will be Current, Voltage, Power, as with other smart switches, but the data I captured when pairing was a base64 encoded "AP" for all three values, but this was a new switch so maybe needs time to collect some data.
Jason Rumney 3 лет назад
Родитель
Сommit
29c8dbb626
1 измененных файлов с 37 добавлено и 0 удалено
  1. 37 0
      custom_components/tuya_local/devices/smartplug_encoded.yaml

+ 37 - 0
custom_components/tuya_local/devices/smartplug_encoded.yaml

@@ -0,0 +1,37 @@
+name: Smartplug with encoded info
+primary_entity:
+  entity: switch
+  class: outlet
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 101
+      type: base64
+      name: unknown101
+      readonly: true
+    - id: 102
+      type: base64
+      name: unknown_102
+      readonly: true
+    - id: 103
+      type: base64
+      name: unknown_103
+      readonly: true
+secondary_entities:
+  - entity: number
+    category: config
+    icon: "mdi:timer"
+    name: Timer
+    dps:
+      - id: 11
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+