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

Fisher Summer: add compatible Kogan 8.2kW aircon

- remove Fisher Summer product, as id is a device id
- add Kogan 8.2kW product details
- modify the feature flag handling for horizontal sweep/position according to how the Kogan seems to function.
- add icons to some entities
- add entities for switches encoded in dp 123
- scale runtime according to original fisher summer docs (one tick every 2 minutes)

PR #2887
Jason Rumney 1 год назад
Родитель
Сommit
90ab7057d7

+ 2 - 2
ACKNOWLEDGEMENTS.md

@@ -846,10 +846,10 @@ Further device support has been made with the assistance of users. Please consid
 - [ulliohura](https://github.com/ulliohura) for contributing support for Create fan with dimmable light.
 - [MikN313](https://github.com/MikN313) for contributing improvements to Grakit filament dryer.
 - [AlixerVolkov](https://github.com/AlixerVolkov) for assisting with support for LSC Smart Connect outdoor PTZ camera.
-- [Mantrid42](https://github.com/Mantrid42) for contributing support for Kogan LX15 vacuum and mopping robot, Kogan 5 pro air purifier.
+- [Mantrid42](https://github.com/Mantrid42) for contributing support for Kogan LX15 vacuum and mopping robot, Kogan 5 pro air purifier, Kogan aircons (merged into Fisher Summer).
 - [sweetpi](https://github.com/sweetpi) for contributing improvements to Rotenso Ronix heatpump.
 - [n4dwxihyeyhes2](https://github.com/n4dwxihyeyhes2) for contributing support for Vestfrost VP-A1Z40HW air purifier.
 - [UDA-CamB](https://github.com/UDA-CamB) for contributing support for KRain KRX8 irrigation controller.
 - [nickmcgill](https://github.com/nickmcgill) for contributing support for Devola Intelligent heater.
 - [Kappa71](https://github.com/Kappa71) for contributing support for Emerio DH-129238.1 dehumidifier.
-- [diviera](https://github.com/diviera) for contributing support for Moes WS-USR-2C double curtain switch.
+- [diviera](https://github.com/diviera) for contributing support for Moes WS-USR-2C double curtain switch

+ 157 - 15
custom_components/tuya_local/devices/fisher_summer_air_conditioner.yaml

@@ -1,14 +1,17 @@
 name: Air conditioner
 products:
-  - id: bf8705744de2dd5ab4ogqj
-    manufacturer: Fisher
-    model: Summer
+  # - id: UNKNOWN
+  #   manufacturer: Fisher
+  #   model: Summer
   - id: u9jjsaluqe1trtxv
     manufacturer: Daitsu
     model: DS-9KTP
   - id: fcnlevuwfd1jgkvx
     manufacturer: Tesla
     model: TT34TP21-1232IAWUV
+  - id: 0v9shs7pwdjuwi9e
+    manufacturer: Kogan
+    model: 8.2kW split aircon
 entities:
   - entity: climate
     translation_only_key: aircon_extra
@@ -81,7 +84,7 @@ entities:
         #   2. Whether the temperature is adjustable in automatic mode
         #   3. Fresh air volume mark
         #   4. Vector air supply (implemented on Set vertical direction)
-        #   5. Left and right sweeping air (implemented on horizontal sweep)
+        #   5. Left and right sweeping air (implemented on horizontal sweep and et horizontal mode basic options)
         #   6. Photosensitive
         #   7. Intelligent dehumidification and anti-mildew
         #   8. Humidity sensor
@@ -101,7 +104,7 @@ entities:
         #   21. temperature scale switching, 1 is Fahrenheit, 0 is Celsius
         #   22. soft wind (implemented on Sleep)
         #   23. left and right wide-angle air supply (implemented on Set
-        #       horizontal direction)
+        #       horizontal direction to filter "wide" options)
       - id: 123
         name: options
         type: string
@@ -139,6 +142,89 @@ entities:
           - dps_val: 32
             value: true
           - value: false
+  - entity: light
+    translation_key: display
+    category: config
+    dps:
+      - id: 123
+        type: hex
+        name: switch
+        mask: "0008"
+  - entity: switch
+    name: Buzzer
+    category: config
+    icon: "mdi:volume-high"
+    dps:
+      - id: 123
+        type: hex
+        name: switch
+        mask: "0010"
+  - entity: switch
+    name: Soft wind
+    category: config
+    icon: "mdi:weather-windy"
+    dps:
+      - id: 123
+        type: hex
+        name: switch
+        mask: "8000"
+  - entity: switch
+    name: Anti-mildew
+    category: config
+    icon: "mdi:water-off-outline"
+    dps:
+      - id: 123
+        type: hex
+        name: switch
+        mask: "0100"
+  - entity: switch
+    name: Health
+    category: config
+    icon: "mdi:heart-outline"
+    dps:
+      - id: 123
+        type: hex
+        name: switch
+        mask: "0020"
+  - entity: switch
+    translation_key: anti_frost
+    category: config
+    dps:
+      - id: 123
+        type: hex
+        name: switch
+        mask: "1000"
+  - entity: switch
+    name: Eco mode
+    category: config
+    icon: "mdi:leaf"
+    dps:
+      - id: 123
+        type: hex
+        name: switch
+        mask: "0001"
+  - entity: switch
+    name: Self cleaning
+    category: config
+    icon: "mdi:spray-bottle"
+    dps:
+      - id: 123
+        type: hex
+        name: switch
+        mask: "0004"
+        mapping:
+          - dps_val: false
+            value: "Off"
+          - dps_val: true
+            constraint: power
+            conditions:
+              - dps_val: true
+                invalid: true
+              - dps_val: false
+                value: Cleaning
+      - id: 1
+        name: power
+        type: boolean
   - entity: binary_sensor
     class: problem
     category: diagnostic
@@ -175,6 +261,7 @@ entities:
   - entity: select
     name: Sleep
     category: config
+    icon: "mdi:weather-night"
     hidden: unavailable
     dps:
       - id: 105
@@ -201,6 +288,7 @@ entities:
   - entity: select
     name: Vertical sweep
     category: config
+    icon: "mdi:arrow-up-down-bold"
     dps:
       - id: 113
         name: option
@@ -218,6 +306,7 @@ entities:
   - entity: select
     name: Horizontal sweep
     category: config
+    icon: "mdi:arrow-left-right-bold"
     hidden: unavailable
     dps:
       - id: 114
@@ -241,6 +330,7 @@ entities:
             value: Partial Right
           - dps_val: "7"
             value: Wide Angle
+            available: wide_available
       - id: 110
         type: bitfield
         name: available
@@ -248,6 +338,13 @@ entities:
           - dps_val: 32
             value: true
           - value: false
+      - id: 110
+        type: bitfield
+        name: wide_available
+        mapping:
+          - dps_val: 8388608
+            value: true
+          - value: false
   - entity: select
     name: Energy saving
     category: config
@@ -277,6 +374,7 @@ entities:
   - entity: select
     name: Generator mode
     category: config
+    icon: "mdi:generator-stationary"
     hidden: unavailable
     dps:
       - id: 120
@@ -287,12 +385,11 @@ entities:
             value: None
             default: true
           - dps_val: L1
-            value: L1
+            value: L1 (30%)
           - dps_val: L2
-            value: L2
+            value: L2 (50%)
           - dps_val: L3
-            value: L3
-        optional: true
+            value: L3 (80%)
       - id: 110
         type: bitfield
         name: available
@@ -302,12 +399,25 @@ entities:
           - value: false
   - entity: sensor
     translation_key: air_quality
+    class: enum
+    category: diagnostic
     hidden: unavailable
     dps:
       - id: 125
         name: sensor
         type: string
         optional: true
+        mapping:
+          - dps_val: great
+            value: excellent
+          - dps_val: good
+            value: good
+          - dps_val: middle
+            value: moderate
+          - dps_val: bad
+            value: poor
+          - dps_val: varybad
+            value: severe
       - id: 110
         name: available
         type: bitfield
@@ -318,6 +428,7 @@ entities:
   - entity: select
     name: Set vertical direction
     category: config
+    icon: "mdi:unfold-more-horizontal"
     hidden: unavailable
     dps:
       - id: 126
@@ -347,6 +458,7 @@ entities:
   - entity: select
     name: Set horizontal direction  # Tuya JSON phrasing: Freeze Horizontal
     category: config
+    icon: "mdi:unfold-more-vertical"
     hidden: unavailable
     dps:
       - id: 127
@@ -368,17 +480,28 @@ entities:
             value: Right
           - dps_val: "6"
             value: Wide angle left
+            available: wide_available
           - dps_val: "7"
             value: Wide angle right
+            available: wide_available
           - dps_val: "8"
             value: Wide angle
+            available: wide_available
       - id: 110
         type: bitfield
         name: available
+        mapping:
+          - dps_val: 32
+            value: true
+          - value: false
+      - id: 110
+        type: bitfield
+        name: wide_available
         mapping:
           - dps_val: 8388608
             value: true
           - value: false
+
   - entity: select
     name: Power
     category: config
@@ -424,6 +547,7 @@ entities:
     class: problem
     hidden: unavailable
     category: diagnostic
+    icon: "mdi:air-filter"
     dps:
       - id: 131
         type: boolean
@@ -439,17 +563,25 @@ entities:
   - entity: select
     name: Hot cold wind
     category: config
-    hidden: unavailable
+    icon: "mdi:sun-snowflake"
     dps:
       - id: 132
         name: option
         type: boolean
+        optional: true
         mapping:
-          - dps_val: true
-            value: Cold Wind
           - dps_val: false
-            value: Hot wind
-        optional: true
+            value: "Off"
+          - dps_val: true
+            constraint: mode
+            conditions:
+              - dps_val: cold
+                value: Cold wind
+              - dps_val: hot
+                value: Hot wind
+      - id: 4
+        name: mode
+        type: string
       - id: 110
         type: bitfield
         name: available
@@ -460,9 +592,19 @@ entities:
   - entity: sensor
     name: Running time
     class: duration
+    hidden: unavailable
     dps:
       - id: 135
         name: sensor
         type: integer
-        unit: s
+        unit: min
         optional: true
+        mapping:
+          - scale: 0.5
+      - id: 110
+        type: bitfield
+        name: available
+        mapping:
+          - dps_val: 1024
+            value: true
+          - value: false