Quellcode durchsuchen

fix(th08_temperature_and_humidity_sensor): matched models

- TH09B from PR #5375
- TH08BCBU from issue #4300
- TH08CBU from issue #2216

Added calibration entities from #5375 by @decompil3d, which also show
in the Query Things Data Model result on #2216
Jason Rumney vor 1 Woche
Ursprung
Commit
9ad122ca10

+ 71 - 0
custom_components/tuya_local/devices/th08_temperature_and_humidity_sensor.yaml

@@ -3,6 +3,15 @@ products:
   - id: xlk3mtpjo1zkmdvh
   - id: xlk3mtpjo1zkmdvh
     manufacturer: Zitech
     manufacturer: Zitech
     model: TH08
     model: TH08
+  - id: ykdqgxukxt7rjyft
+    manufacturer: Zitech
+    model: TH09B
+  - id: scyh3efocxxfgryg
+    manufacturer: Zitech
+    model: TH08BCBU
+  - id: idypkbokardxt823
+    manufacturer: Zitech
+    model: TH08CBU
 entities:
 entities:
   - entity: sensor
   - entity: sensor
     class: temperature
     class: temperature
@@ -22,10 +31,26 @@ entities:
         name: sensor
         name: sensor
         unit: "%"
         unit: "%"
         class: measurement
         class: measurement
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 3
+        type: integer
+        name: sensor
+        unit: "%"
+        mapping:
+          - dps_val: low
+            value: 20
+          - dps_val: middle
+            value: 50
+          - dps_val: high
+            value: 80
   - entity: sensor
   - entity: sensor
     name: Power state
     name: Power state
     class: enum
     class: enum
     category: diagnostic
     category: diagnostic
+    deprecated: sensor_battery  # 2026-06-23
     dps:
     dps:
       - id: 3
       - id: 3
         type: string
         type: string
@@ -49,3 +74,49 @@ entities:
             value: fahrenheit
             value: fahrenheit
           - dps_val: "c"
           - dps_val: "c"
             value: celsius
             value: celsius
+  - entity: number
+    translation_key: temperature_calibration
+    category: config
+    class: temperature_delta
+    hidden: unavailable
+    dps:
+      - id: 23
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: -20
+          max: 20
+        mapping:
+          - scale: 10
+      - id: 23
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: number
+    name: Humidity calibration
+    category: config
+    hidden: unavailable
+    icon: "mdi:water-check"
+    dps:
+      - id: 24
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: -10
+          max: 10
+      - id: 24
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true