Procházet zdrojové kódy

TYTE D1: make energy reading optional

- remove forced updates from other sensors as there is no indication
  they are needed for this device, and may be causing harm.

Issue #1044
Jason Rumney před 2 roky
rodič
revize
46befd4100

+ 2 - 3
custom_components/tuya_local/devices/tyte_d1_thermostat.yaml

@@ -118,9 +118,11 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         unit: Wh
         unit: Wh
+        optional: true
       - id: 17
       - id: 17
         type: integer
         type: integer
         name: coefficient
         name: coefficient
+        optional: true
   - entity: sensor
   - entity: sensor
     class: current
     class: current
     category: diagnostic
     category: diagnostic
@@ -128,7 +130,6 @@ secondary_entities:
       - id: 11
       - id: 11
         type: integer
         type: integer
         name: sensor
         name: sensor
-        force: true
         unit: mA
         unit: mA
         class: measurement
         class: measurement
       - id: 15
       - id: 15
@@ -143,7 +144,6 @@ secondary_entities:
         name: sensor
         name: sensor
         unit: W
         unit: W
         class: measurement
         class: measurement
-        force: true
         mapping:
         mapping:
           - scale: 10
           - scale: 10
       - id: 16
       - id: 16
@@ -160,7 +160,6 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         unit: V
         unit: V
-        force: true
         class: measurement
         class: measurement
         mapping:
         mapping:
           - scale: 10
           - scale: 10