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

TH05 temp/humidity: add compatible TH05F-BLE

- make battery optional
- add optional calibration entities (disabled by default)

Issue #2970
Jason Rumney 11 месяцев назад
Родитель
Сommit
06f20a5d3f
1 измененных файлов с 33 добавлено и 0 удалено
  1. 33 0
      custom_components/tuya_local/devices/th05_temp_humidity_sensor.yaml

+ 33 - 0
custom_components/tuya_local/devices/th05_temp_humidity_sensor.yaml

@@ -2,6 +2,8 @@ name: Temperature and humidity Sensor
 products:
 products:
   - id: vyfoip9h
   - id: vyfoip9h
     model: TH05-BLE
     model: TH05-BLE
+  - id: 1jvidcsf
+    model: TH05F-BLE
 entities:
 entities:
   - entity: sensor
   - entity: sensor
     class: temperature
     class: temperature
@@ -40,5 +42,36 @@ entities:
     dps:
     dps:
       - id: 4
       - id: 4
         type: integer
         type: integer
+        optional: true
         name: sensor
         name: sensor
         unit: "%"
         unit: "%"
+  - entity: number
+    name: Temperature calibration
+    category: config
+    hidden: true
+    icon: "mdi:thermometer-check"
+    dps:
+      - id: 23
+        type: integer
+        optional: true
+        name: value
+        unit: °
+        range:
+          min: -20
+          max: 20
+        mapping:
+          - scale: 10
+  - entity: number
+    name: Humidity calibration
+    category: config
+    hidden: true
+    icon: "mdi:water-check"
+    dps:
+      - id: 24
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: -10
+          max: 10