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

Add support for PT216/PT19DB-2 BLE temperature/humidity sensor

Issue #434
Jason Rumney 2 лет назад
Родитель
Сommit
5a7d345d55
3 измененных файлов с 99 добавлено и 0 удалено
  1. 2 0
      ACKNOWLEDGEMENTS.md
  2. 18 0
      DEVICES.md
  3. 79 0
      custom_components/tuya_local/devices/ble_pt216_temp_humidity.yaml

+ 2 - 0
ACKNOWLEDGEMENTS.md

@@ -252,3 +252,5 @@ Further device support has been made with the assistance of users.  Please consi
 - [pdw-mb](https://github.com/pdw-mb) for contributing support for inow heater element with dual air and water temperature control.
 - [ianalexander](https://github.com/ianalexander) for contributing support for Zemismart roller shade, which was merged into loratap curtain switch config.
 - [xZetsubou](https://github.com/xZetsubou) for contributing improvements for covers to better support Zemismart roller shades, triple switch with timers, and quad switch plus USB with restore power state config.
+- [burn1879](https://github.com/burn1879) for contributing support for subdevices, and Loratap zigbee curtains.
+- [hronek](https://github.com/hronek) for assisting with support for BLE PT216 temperature and humidity sensors.

+ 18 - 0
DEVICES.md

@@ -370,3 +370,21 @@ of device.
 - Yieryi water quality monitor (also matches unbranded PH-W3988 device)
 - ZX-G30 alarm system (not as an alarm_control_panel, as individual inputs and sensors)
 - ZY-M100-WiFi mmWave human presence sensor
+
+### Devices supported via Bluetooth hubs
+
+- PT216/PT19DB-2 BLE temperature and humidity sensor
+
+### Devices supported via IR hubs
+
+### Devices supported via Zigbee hubs
+
+- LoraTap SC500ZB-V2 curtain controller
+
+
+NOTE: this project does not intend to expand the scope to support non-Tuya
+devices via Tuya hubs.  Though it may be techincally feasible to do such a
+thing, it expands the support requirements beyond the capacity of the
+volunteer manpower of this project.  The community would be better served by
+making Tuya devices work with the standard BLE and Zigbee support in
+Home Assistant rather than the other way around.

+ 79 - 0
custom_components/tuya_local/devices/ble_pt216_temp_humidity.yaml

@@ -0,0 +1,79 @@
+name: Temperature and humidity sensor
+products:
+  - id: 04nb6kdt
+    name: PT216 / PT19DB-2
+primary_entity:
+  entity: sensor
+  name: Temperature
+  class: temperature
+  dps:
+    - id: 1
+      type: integer
+      name: sensor
+      unit: C
+      class: measurement
+      mapping:
+        - scale: 10
+secondary_entities:
+  - entity: sensor
+    name: Humidity
+    class: humidity
+    dps:
+      - id: 2
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: sensor
+    name: Battery
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 4
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: number
+    name: Report interval
+    category: config
+    icon: "mdi:clock"
+    dps:
+      - id: 17
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 5
+          max: 60
+  - entity: number
+    name: Temperature sensitivity
+    category: config
+    icon: "mdi:thermometer"
+    dps:
+      - id: 19
+        type: integer
+        name: value
+        unit: C
+        range:
+          min: 1
+          max: 10
+        mapping:
+          - scale: 10
+  - entity: number
+    name: Humidity sensitivity
+    category: config
+    icon: "mdi:water-percent"
+    dps:
+      - id: 20
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 3
+          max: 10
+
+
+
+
+