ソースを参照

Quad powerstrip: make sensors optional

The sensors were marked as force, which implies that they
don't show up by default, so should be optional.
This should make the config compatible with devices without
sensors, though they may get confused by the forced polling
for sensors that do not exist, so there may still be a need
for a separate config.

Possibly compatible Pearl USB hub added.  issue #1031
Jason Rumney 2 年 前
コミット
242ca209c2
1 ファイル変更5 行追加0 行削除
  1. 5 0
      custom_components/tuya_local/devices/quad_powerstrip.yaml

+ 5 - 0
custom_components/tuya_local/devices/quad_powerstrip.yaml

@@ -2,6 +2,8 @@ name: Quad powerstrip
 products:
 products:
   - id: l5gnaxuawkjfquqo
   - id: l5gnaxuawkjfquqo
     name: Kogan KASPS10A3P3UA 3+USB
     name: Kogan KASPS10A3P3UA 3+USB
+  - id: key5nck4tavy43jp
+    name: Pearl Xystec NX-4986-919 4xUSB
 primary_entity:
 primary_entity:
   entity: switch
   entity: switch
   name: Outlet 1
   name: Outlet 1
@@ -106,6 +108,7 @@ secondary_entities:
         type: integer
         type: integer
         class: measurement
         class: measurement
         force: true
         force: true
+        optional: true
         unit: mA
         unit: mA
       - id: 23
       - id: 23
         type: integer
         type: integer
@@ -120,6 +123,7 @@ secondary_entities:
         type: integer
         type: integer
         class: measurement
         class: measurement
         force: true
         force: true
+        optional: true
         unit: W
         unit: W
         mapping:
         mapping:
           - scale: 10
           - scale: 10
@@ -136,6 +140,7 @@ secondary_entities:
         type: integer
         type: integer
         class: measurement
         class: measurement
         force: true
         force: true
+        optional: true
         unit: V
         unit: V
         mapping:
         mapping:
           - scale: 10
           - scale: 10