Selaa lähdekoodia

ZY-HPS01 presence sensor: add alternate illuminance dp

Some devices with the same model have illuminance on dp 11.
Include this as an alternative to redirect to when 103 is not available.
Remove the range, as it is not needed for a sensor.

Issue #2849
Jason Rumney 1 vuosi sitten
vanhempi
commit
bd405472c0

+ 8 - 4
custom_components/tuya_local/devices/zyhps01_human_presence_sensor.yaml

@@ -20,13 +20,17 @@ entities:
     dps:
     dps:
       - id: 103
       - id: 103
         type: integer
         type: integer
+        optional: true
         name: sensor
         name: sensor
         unit: lx
         unit: lx
         class: measurement
         class: measurement
-        range:
-          min: 0
-          max: 3000
-
+        mapping:
+          - dps_val: null
+            value_redirect: alt
+      - id: 11
+        type: integer
+        optional: true
+        name: alt
   - entity: number
   - entity: number
     name: Presence delay
     name: Presence delay
     category: config
     category: config