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

Add support for Royal Clima ventilation system

Issue #825

Used fan as the primary entity, with climate only for the heating
function.  This is less complex than trying to combine both into the
climate entity, and probably less confusing.
Jason Rumney 2 лет назад
Родитель
Сommit
d5fffcea38

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -321,3 +321,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [luyzfernando08](https://github.com/luyzfernando08) for contributing support for GauTone PG-103 alarm systems.
 - [luyzfernando08](https://github.com/luyzfernando08) for contributing support for GauTone PG-103 alarm systems.
 - [jafar-atili](https://github.com/jafar-atili) for contributing improvements to Lytmi Fantasy 3 HDMI sync backlights.
 - [jafar-atili](https://github.com/jafar-atili) for contributing improvements to Lytmi Fantasy 3 HDMI sync backlights.
 - [samgalagher](https://github.com/samgalagher) for contributing support for Yinmik WF-3188 water quality monitors.
 - [samgalagher](https://github.com/samgalagher) for contributing support for Yinmik WF-3188 water quality monitors.
+- [tariya-garker](https://github.com/tariya-garker) for assitance with support for Royal Clima RCB 150 ventilation systems.

+ 1 - 0
DEVICES.md

@@ -131,6 +131,7 @@
 - Ledkia fan and light controller
 - Ledkia fan and light controller
 - Lexy F501 fan
 - Lexy F501 fan
 - Mantra ceiling fan with light
 - Mantra ceiling fan with light
+- Royal Clima RCB 150 ventilation system
 - Skyfan DC fan
 - Skyfan DC fan
 - Skyfan DC fan with light
 - Skyfan DC fan with light
 - Stirling FS1-40DC pedestal fan
 - Stirling FS1-40DC pedestal fan

+ 182 - 0
custom_components/tuya_local/devices/royalclima_rcb150_ventilation.yaml

@@ -0,0 +1,182 @@
+name: Ventilation system
+products:
+  - id: qcgxajmb0sdg608j
+    name: Royal Clima RCB 150
+primary_entity:
+  entity: fan
+  translation_key: ventilation
+  dps:
+    - id: 1
+      name: switch
+      type: boolean
+    - id: 2
+      name: preset_mode
+      type: string
+      mapping:
+        - dps_val: Air_Supply
+          value: fresh
+        - dps_val: Recirculation
+          value: circulate
+        - dps_val: Sleep
+          value: sleep
+        - dps_val: Auto
+          value: auto
+        - dps_val: Eco
+          value: eco
+        - dps_val: Anti_Condensation
+          value: anti-condensation
+    - id: 12
+      name: speed
+      type: string
+      mapping:
+        - dps_val: "1"
+          value: 17
+        - dps_val: "2"
+          value: 33
+        - dps_val: "3"
+          value: 50
+        - dps_val: "4"
+          value: 67
+        - dps_val: "5"
+          value: 83
+        - dps_val: "6"
+          value: 100
+secondary_entities:
+  - entity: sensor
+    name: PM 2.5
+    class: pm25
+    dps:
+      - id: 3
+        type: integer
+        name: sensor
+        unit: ugm3 
+        class: measurement
+  - entity: switch
+    name: Ionizer
+    icon: "mdi:creation"
+    category: config
+    dps:
+      - id: 5
+        type: boolean
+        name: switch
+  - entity: sensor
+    name: Filter life
+    icon: "mdi:air-filter"
+    category: diagnostic
+    dps:
+      - id: 11
+        type: integer
+        name: sensor
+        unit: "%"
+  - entity: button
+    name: Filter reset
+    category: config
+    dps:
+      - id: 13
+        type: boolean
+        name: button
+  - entity: select
+    name: "On timer"
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 16
+        type: string
+        name: option
+        mapping:
+          - dps_val: cancel
+            value: "Off"
+          - dps_val: "1h"
+            value: "1 hour"
+          - dps_val: "2h"
+            value: "2 hours"
+          - dps_val: "3h"
+            value: "3 hours"
+          - dps_val: "4h"
+            value: "4 hours"
+          - dps_val: "5h"
+            value: "5 hours"
+          - dps_val: "6h"
+            value: "6 hours"
+          - dps_val: "7h"
+            value: "7 hours"
+          - dps_val: "8h"
+            value: "8 hours"
+          - dps_val: "9h"
+            value: "9 hours"
+          - dps_val: "10h"
+            value: "10 hours"
+          - dps_val: "11h"
+            value: "11 hours"
+          - dps_val: "12h"
+            value: "12 hours"
+  - entity: sensor
+    name: Outdoor temperature
+    class: temperature
+    dps:
+      - id: 22
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+  - entity: climate
+    name: Heater
+    icon: "mdi:heat-wave"
+    dps:
+      - id: 42
+        name: hvac_mode
+        type: boolean
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: fan_switch
+            conditions:
+              - dps_val: true
+                value: heat
+              - value: "off"
+      - id: 102
+        name: temperature
+        type: integer
+        range:
+          min: 10
+          max: 30
+      - id: 1
+        name: fan_switch
+        type: boolean
+        hidden: true
+  - entity: select
+    name: "Off timer"
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 101
+        type: string
+        name: option
+        mapping:
+          - dps_val: cancel
+            value: "Off"
+          - dps_val: "1h"
+            value: "1 hour"
+          - dps_val: "2h"
+            value: "2 hours"
+          - dps_val: "3h"
+            value: "3 hours"
+          - dps_val: "4h"
+            value: "4 hours"
+          - dps_val: "5h"
+            value: "5 hours"
+          - dps_val: "6h"
+            value: "6 hours"
+          - dps_val: "7h"
+            value: "7 hours"
+          - dps_val: "8h"
+            value: "8 hours"
+          - dps_val: "9h"
+            value: "9 hours"
+          - dps_val: "10h"
+            value: "10 hours"
+          - dps_val: "11h"
+            value: "11 hours"
+          - dps_val: "12h"
+            value: "12 hours"

+ 14 - 0
custom_components/tuya_local/translations/en.json

@@ -179,6 +179,20 @@
                         }
                         }
                     }
                     }
                 }
                 }
+            },
+            "ventilation": {
+                "state_attributes": {
+                    "preset_mode": {
+                        "state": {
+                            "fresh": "Fresh air",
+                            "circulate": "Circulate",
+                            "sleep": "Sleep",
+                            "auto": "Auto",
+                            "eco": "Eco",
+                            "anti-condensation": "Anti-condensation"
+                        }
+                    }
+                }
             }
             }
         }
         }
     }
     }