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

feat (etop_hy_thermostat): add compatible BVF 801

Compatible dps layout, but is missing the window open detection switch
though it does list "window_opened" as one of the action states.

Adapt hvac_action to handle the expanded states, and add a binary_sensor
for the window_opened state.

Disable the window open detection switch when unavailable.

Issue #4079
Jason Rumney 2 месяцев назад
Родитель
Сommit
efb1338a43
1 измененных файлов с 24 добавлено и 2 удалено
  1. 24 2
      custom_components/tuya_local/devices/etop_ht_thermostat.yaml

+ 24 - 2
custom_components/tuya_local/devices/etop_ht_thermostat.yaml

@@ -6,6 +6,9 @@ products:
   - id: zhfbsam03cs0ge5n
     manufacturer: PNI
     model: CT-400
+  - id: np9tyrarxphw5b6m
+    manufacturer: BVF
+    model: BVF-801
 entities:
   - entity: climate
     translation_key: thermostat
@@ -32,10 +35,9 @@ entities:
         type: string
         name: hvac_action
         mapping:
-          - dps_val: no_heating
-            value: idle
           - dps_val: heating
             value: heating
+          - value: idle
       - id: 24
         type: integer
         name: current_temperature
@@ -84,14 +86,34 @@ entities:
       - id: 10
         type: boolean
         name: switch
+  - entity: binary_sensor
+    class: window
+    category: diagnostic
+    dps:
+      - id: 3
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: window_opened
+            value: true
+          - value: false
   - entity: switch
     name: Window detection
     category: config
+    hidden: unavailable
     dps:
       - id: 8
         type: boolean
         optional: true
         name: switch
+      - id: 8
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: lock
     translation_key: child_lock
     category: config