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

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 лет назад
Родитель
Сommit
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:
   - id: l5gnaxuawkjfquqo
     name: Kogan KASPS10A3P3UA 3+USB
+  - id: key5nck4tavy43jp
+    name: Pearl Xystec NX-4986-919 4xUSB
 primary_entity:
   entity: switch
   name: Outlet 1
@@ -106,6 +108,7 @@ secondary_entities:
         type: integer
         class: measurement
         force: true
+        optional: true
         unit: mA
       - id: 23
         type: integer
@@ -120,6 +123,7 @@ secondary_entities:
         type: integer
         class: measurement
         force: true
+        optional: true
         unit: W
         mapping:
           - scale: 10
@@ -136,6 +140,7 @@ secondary_entities:
         type: integer
         class: measurement
         force: true
+        optional: true
         unit: V
         mapping:
           - scale: 10