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

Costway air conditioner: code review tweaks and documentation

Jason Rumney 2 лет назад
Родитель
Сommit
3b7166a5d0

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -300,3 +300,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [eivindsor](https://github.com/eivindsor) for assisting with support for Lucking HS6 smart locks.
 - [epajfl00](https://github.com/epajfl00) for assisting with support for Neo Coolcam sirens.
 - [jorometala](https://github.com/jorometala) for assisting with support for Iebeyond ECH RF hub doorbells.
+- [Yersi88](https://github.com/Yersi88) for contributing support for Costway portable air conditioners.

+ 1 - 0
DEVICES.md

@@ -32,6 +32,7 @@
 - Be Cool BC14KL2101F
 - Carson CB PA280
 - Cooper&Hunter Nordic Evo Ng
+- Costway portable air conditioner
 - Daewoo Dhome OL-A011 air conditioner (DA9KWE)
 - Daizuki heat pump
 - Duux Blizzard portable air conditioner

+ 4 - 9
custom_components/tuya_local/devices/costway_portable_ac.yaml

@@ -1,6 +1,7 @@
-name: COSTWAY Portable Air Conditioner
+name: Portable air conditioner
 products:
   - id: 86sjxqebxymrjt3z
+    name: COSTWAY
 primary_entity:
   entity: climate
   dps:
@@ -29,13 +30,7 @@ primary_entity:
       range:
         min: 16
         max: 30
-      mapping:
-        - constraint: temperature_unit
-          conditions:
-            - dps_val: C
-              range:
-                min: 16
-                max: 31
+      unit: C
     - id: 3
       type: integer
       name: current_temperature
@@ -53,7 +48,7 @@ primary_entity:
           value: high
     - id: 20
       type: integer
-      name: unknow_20
+      name: unknown_20
     - id: 103
       type: boolean
       name: unknown_103