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

Add support for Arlec PA1123BKHA portable air conditioner

Tataihono Nikora 2 лет назад
Родитель
Сommit
255a9bddb4

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -434,3 +434,4 @@ Further device support has been made with the assistance of users. Please consid
 - [MJW911](https://github.com/MJW911) for assisting with support for SX1 smartplugs.
 - [ops244](https://github.com/ops244) for assisting with support for Hiper T3 bladeless fans.
 - [sevimuelli](https://github.com/sevimuelli) for contributing support for Eeese Anna dehumidifiers.
+- [tataihono](https://github.com/tataihono) for contributing support for Arlec Portable Air Conditioner.

+ 2 - 1
DEVICES.md

@@ -43,6 +43,7 @@
 
 ### Air Conditioners / Heatpumps
 
+- Arlec PA1123BKHA portable air conditioner
 - Be Cool BC14KL2101F
 - Carson CB PA280
 - Cooper&Hunter Nordic Evo Ng
@@ -385,7 +386,7 @@ of device.
 - Simple triple switch - three switches in a single device, tested with Somgam 3 gang wall switches.
 - Simple quad switch - four switches in a single device, tested with Somgam 4 gang wall switches.
 - Simple 6-way switch - six switches in a single device
-- Simple 8 switch - eight switches in a single device 
+- Simple 8 switch - eight switches in a single device
 - RGB Nightlight outlet - one smartplug with a small built-in RGB light.
 
 ### Lights

+ 128 - 0
custom_components/tuya_local/devices/arlec_pa1123bkha_portable_air_conditioner.yaml

@@ -0,0 +1,128 @@
+name: Arlec PA1123BKHA portable air conditioner
+products:
+  - id: fxy4qkdh62geizbw
+    name: Arlec PA1123BKHA portable air conditioner
+primary_entity:
+  entity: climate
+  dps:
+    - id: 1
+      name: hvac_mode
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          constraint: mode
+          conditions:
+            - dps_val: 1
+              value: "cool"
+            - dps_val: 2
+              value: "heat"
+            - dps_val: 3
+              value: "dry"
+            - dps_val: 4
+              value: "fan_only"
+    - id: 2
+      type: integer
+      name: temperature
+      range:
+        min: 16
+        max: 31
+      mapping:
+        - constraint: temperature_unit
+          conditions:
+            - dps_val: true
+              value_redirect: temp_set_f
+              range:
+                min: 62
+                max: 90
+    - id: 3
+      type: integer
+      name: current_temperature
+      readonly: true
+      mapping:
+        - constraint: temperature_unit
+          conditions:
+            - dps_val: true
+              value_redirect: temp_current_f
+    - id: 20
+      name: error
+      type: bitfield
+      mapping:
+        - dps_val: 0
+          value: "OK"
+    - id: 101
+      name: mode
+      type: string
+    - id: 103
+      name: preset_mode
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: none
+        - dps_val: true
+          value: sleep
+    - id: 104
+      type: string
+      name: fan_mode
+      mapping:
+        - dps_val: "1"
+          value: high
+        - dps_val: "2"
+          value: medium
+        - dps_val: "3"
+          value: low
+    - id: 106
+      name: swing_mode
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          value: vertical
+    - id: 109
+      type: boolean
+      name: temperature_unit
+      mapping:
+        - dps_val: true
+          value: F
+        - value: C
+    - id: 110
+      type: integer
+      name: temp_set_f
+      range:
+        min: 62
+        max: 90
+      hidden: true
+      optional: true
+    - id: 111
+      type: integer
+      name: temp_current_f
+      hidden: true
+      optional: true
+secondary_entities:
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 105
+        type: integer
+        name: value
+        unit: hour
+        range:
+          min: 0
+          max: 24
+  - entity: select
+    name: Temperature unit
+    icon: "mdi:temperature-celsius"
+    category: config
+    dps:
+      - id: 109
+        type: boolean
+        name: option
+        mapping:
+          - dps_val: false
+            value: Celsius
+          - dps_val: true
+            value: Fahrenheit