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

Beca BHT002: use standard attributes for new dps

- dp 103 can be climate hvac_action.
- dps 104 can be the feature flag for the External temperature sensor
- dp 103 should be optional, as it appears older models do not support it
- dp 102 made optional so a merge of moes_bht002 can be made the logs for the issue that saw that created showed dp 104 was false (and no dp 103).

PR #2640
Jason Rumney 1 год назад
Родитель
Сommit
789adc47a7
1 измененных файлов с 10 добавлено и 11 удалено
  1. 10 11
      custom_components/tuya_local/devices/beca_bht002_thermostat_c.yaml

+ 10 - 11
custom_components/tuya_local/devices/beca_bht002_thermostat_c.yaml

@@ -48,22 +48,16 @@ primary_entity:
           value: eco
         - dps_val: false
           value: comfort
-    - id: 102
-      type: integer
-      name: floor_temperature
-      mapping:
-        - scale: 2
     - id: 103
-      type: enum
-      name: tempSwitch
+      type: string
+      # There are many variants of BHT-002 on the market, not all support this
+      optional: true
+      name: hvac_action
       conditions:
         - dps_val: "0"
-          value: not_heating
+          value: idle
         - dps_val: "1"
           value: heating
-    - id: 104
-      type: boolean
-      name: floortempFunction
 secondary_entities:
   - entity: lock
     translation_key: child_lock
@@ -78,8 +72,13 @@ secondary_entities:
     dps:
       - id: 102
         type: integer
+        # If dp 104 is false, this may not be present
+        optional: true
         name: sensor
         unit: C
         class: measurement
         mapping:
           - scale: 2
+      - id: 104
+        type: boolean
+        name: available