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

Add Pioneer ECOasis 150 ERV (#5428)

* Add Pioneer ECOasis 150 ERV

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use filter_reset translation_key for filter reset button

The untranslated_entities check flagged the Filter reset button: its
name matches the existing button.filter_reset translation key, so use
translation_key instead of a hardcoded name (keeps the mdi:filter-remove
icon override).

* Address review: translated presets, class defaults, problem sensor

- Use fan_with_presets translation key with translated preset values
- Drop redundant name/icon from device-class sensors (use HA defaults)
- Replace fault/filter sensors with a single problem binary_sensor,
  retaining raw values as fault_code and filter_status attributes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Changes from review

- strictly follow filename convention of brand_model_type
- use fan entities for supply and exhaust fan speed settings
- add config category and limit availability to manual mode only for above
- change button from diagnostic to config (only the specific use documented by HA should be diagnostic)
- move filter status to filter reset button rather than problem sensor

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
ptparker 2 дней назад
Родитель
Сommit
b658ab85cd
1 измененных файлов с 161 добавлено и 0 удалено
  1. 161 0
      custom_components/tuya_local/devices/pioneer_ecoasis150_erv.yaml

+ 161 - 0
custom_components/tuya_local/devices/pioneer_ecoasis150_erv.yaml

@@ -0,0 +1,161 @@
+name: Energy recovery ventilator
+
+products:
+  - id: jqjrmutjj0zfhjzr
+    manufacturer: Pioneer
+    model: ECOasis 150
+
+entities:
+  #################################################################
+  # Controls
+  #################################################################
+
+  - entity: fan
+    translation_only_key: fan_with_presets
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+
+      - id: 2
+        type: string
+        name: preset_mode
+        mapping:
+          # Device firmware reports the truncated value "manua" (confirmed
+          # from the raw Tuya IoT portal JSON), not "manual".
+          - dps_val: manua
+            value: manual
+          - dps_val: auto
+            value: auto
+          - dps_val: sleep
+            value: sleep
+          - dps_val: "4"
+            value: low
+          - dps_val: "5"
+            value: medium
+          - dps_val: "6"
+            value: high
+
+  - entity: fan
+    name: Supply
+    category: config
+    dps:
+      - id: 101
+        type: integer
+        name: speed
+        range:
+          min: 0
+          max: 8
+      - id: 1
+        type: boolean
+        name: power
+      - id: 2
+        type: string
+        name: available
+        mapping:
+          - dps_val: manua
+            value_redirect: power
+          - value: false
+
+  - entity: fan
+    name: Exhaust
+    category: config
+    dps:
+      - id: 102
+        type: integer
+        name: speed
+        range:
+          min: 0
+          max: 8
+      - id: 1
+        type: boolean
+        name: power
+      - id: 2
+        type: string
+        name: available
+        mapping:
+          - dps_val: manua
+            value_redirect: power
+          - value: false
+
+  #################################################################
+  # Sensors
+  #################################################################
+
+  - entity: sensor
+    class: pm25
+    dps:
+      - id: 3
+        type: integer
+        name: sensor
+        unit: "µg/m³"
+        class: measurement
+
+  - entity: sensor
+    class: carbon_dioxide
+    dps:
+      - id: 6
+        type: integer
+        name: sensor
+        unit: ppm
+        class: measurement
+
+  - entity: sensor
+    class: volatile_organic_compounds_parts
+    dps:
+      - id: 7
+        type: integer
+        name: sensor
+        unit: ppb
+        class: measurement
+
+  - entity: sensor
+    class: humidity
+    dps:
+      - id: 8
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 9
+        type: integer
+        name: sensor
+        unit: F
+        class: measurement
+
+  #################################################################
+  # Diagnostics: filter and fault state
+  #################################################################
+
+  - entity: button
+    translation_key: filter_reset
+    category: config
+    dps:
+      - id: 13
+        type: boolean
+        name: button
+      # Filter status codes 0-3 are undocumented; exposed as a raw
+      # attribute rather than an entity until their meaning is known.
+      - id: 105
+        type: string
+        name: filter_status
+
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 18
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      # Retain the raw fault bitmap for diagnostics.
+      - id: 18
+        type: bitfield
+        name: fault_code