Ver código fonte

Add optional attributes to smartplugv2.

This seems to be the most common configuration for smart plugs, and many have
additional features.  Add some common read-only attributes as optional so they
will be available to read if the switch has them.
Jason Rumney 3 anos atrás
pai
commit
233ebf9be4
1 arquivos alterados com 24 adições e 0 exclusões
  1. 24 0
      custom_components/tuya_local/devices/smartplugv2.yaml

+ 24 - 0
custom_components/tuya_local/devices/smartplugv2.yaml

@@ -28,6 +28,30 @@ primary_entity:
       read-only: true
       mapping:
         - scale: 10
+    - id: 21
+      type: bitfield
+      name: factory_test
+      optional: true
+    - id: 22
+      type: integer
+      name: voltage_calibration
+      optional: true
+    - id: 23
+      type: integer
+      name: current_calibration
+      optional: true
+    - id: 24
+      type: integer
+      name: power_calibration
+      optional: true
+    - id: 25
+      type: integer
+      name: energy_calibration
+      optional: true
+    - id: 26
+      type: integer
+      name: fault_code
+      optional: true
 secondary_entities:
   - entity: sensor
     category: diagnostic