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

SmartplugV2 EnergyV2: loosen up requirement for energy sensor.

This is quite a full featured smartplug, and would match many more models
if the energy sensor and calibration values were optional, as many smartplugs
do not always return those.

Issue #1409
- this smartplug contains 3 extra unsupported values: overcharge protection, inching and random timer, the latter 2 of which are complex encodings that cannot be supported.  But for now, this is a better match than the Aubess 1-gang switch it currently matches.
Jason Rumney 2 лет назад
Родитель
Сommit
38be79b497
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      custom_components/tuya_local/devices/smartplugv2_energyv2.yaml

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

@@ -45,10 +45,12 @@ secondary_entities:
       - id: 17
         name: sensor
         type: integer
+        optional: true
         unit: Wh
       - id: 25
         type: integer
         name: calibration
+        optional: true
   - entity: sensor
     category: diagnostic
     class: current
@@ -62,6 +64,7 @@ secondary_entities:
       - id: 23
         type: integer
         name: calibration
+        optional: true
   - entity: sensor
     category: diagnostic
     class: power
@@ -77,6 +80,7 @@ secondary_entities:
       - id: 24
         type: integer
         name: calibration
+        optional: true
   - entity: sensor
     category: diagnostic
     class: voltage
@@ -92,6 +96,7 @@ secondary_entities:
       - id: 22
         type: integer
         name: calibration
+        optional: true
   - entity: binary_sensor
     class: problem
     category: diagnostic