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

Add support for Sensei Air Conditioner (#1955)

Authored-by: Ivan Volkov <ivan.volkov@oracle.com>
Ivan Volkov 1 год назад
Родитель
Сommit
77eb0c5cf4
3 измененных файлов с 302 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 300 0
      custom_components/tuya_local/devices/sensei_airconditioner.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -566,3 +566,4 @@ Further device support has been made with the assistance of users. Please consid
 - [psuet](https://github.com/psuet) for assisting with support for XCase lock boxes.
 - [Zylazy](https://github.com/Zylazy) for assisting with support for Hoenyzy valve timers.
 - [Zelaf](https://github.com/Zelaf) for contributing improvements to Nedis portable air conditioner.
+- [JohnyDNU](https://github.com/JohnyDNU) for assistance in support for Sensei Air Conditioner.

+ 1 - 0
DEVICES.md

@@ -90,6 +90,7 @@
 - Royal Sovereign RSAI-12SA mini split air conditioner
 - Sencor MT7048C air conditioner
 - Sendo air conditioner
+- Sensei Air Conditioner
 - Star-Light air conditioner (also confirmed to work with Polar branded devices)
 - Suntec Wellness Coolfixx portable air conditioner
 - Tesla Smart TAF and AUX series air conditioners

+ 300 - 0
custom_components/tuya_local/devices/sensei_airconditioner.yaml

@@ -0,0 +1,300 @@
+name: Air conditioner
+products:
+  - id: f3goccgfj6qino4c
+    name: Sensei Air Conditioner
+primary_entity:
+  entity: climate
+  translation_key: aircon_extra
+  dps:
+    - id: 1
+      type: boolean
+      name: hvac_mode
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          constraint: mode
+          conditions:
+            - dps_val: auto
+              value: heat_cool
+            - dps_val: cold
+              value: cool
+            - dps_val: wet
+              value: dry
+            - dps_val: heat
+              value: heat
+            - dps_val: fan
+              value: fan_only
+            - dps_val: null
+              value: "off"
+              hidden: true
+    - id: 2
+      type: integer
+      name: temperature
+      unit: c
+      range:
+        min: 160
+        max: 320
+      mapping:
+        - scale: 10
+          step: 10
+          constraint: temperature_unit
+          conditions:
+            - dps_val: f
+              range:
+                min: 600
+                max: 900
+    - id: 3
+      type: integer
+      name: current_temperature
+      mapping:
+        - scale: 10
+          constraint: temperature_unit
+          conditions:
+            - dps_val: f
+    - id: 4
+      type: string
+      name: mode
+      hidden: true
+      optional: true
+    - id: 5
+      type: string
+      name: fan_mode
+      mapping:
+        - dps_val: auto
+          value: auto
+        - dps_val: mute
+          value: quiet
+        - dps_val: low
+          value: low
+        - dps_val: low_mid
+          value: medlow
+        - dps_val: mid
+          value: medium
+        - dps_val: mid_high
+          value: medhigh
+        - dps_val: high
+          value: high
+        - dps_val: turbo
+          value: strong
+    - id: 8
+      type: boolean
+      optional: true
+      name: preset_mode
+      mapping:
+        - dps_val: true
+          value: eco
+        - dps_val: false
+          value: comfort
+    - id: 15
+      name: swing_mode
+      type: string
+      mapping:
+        - dps_val: un_down
+          value: vertical
+        - dps_val: left_right
+          value: horizontal
+        - dps_val: all
+          value: both
+        - dps_val: "off"
+          value: "off"
+    - id: 20
+      type: bitfield
+      name: fault_code
+    - id: 105
+      name: temperature_unit
+      type: string
+      optional: true
+
+secondary_entities:
+  - entity: switch
+    name: Wet
+    icon: "mdi:hvac"
+    dps:
+      - id: 9
+        name: switch
+        type: boolean
+  - entity: switch
+    name: Emergency heat
+    icon: "mdi:fire"
+    dps:
+      - id: 12
+        name: switch
+        type: boolean
+  - entity: light
+    name: Backlight
+    category: config
+    icon: "mdi:television-ambient-light"
+    dps:
+      - id: 13
+        name: switch
+        type: boolean
+  - entity: number
+    name: "Countdown"
+    category: config
+    translation_key: timer
+    dps:
+      - id: 21
+        type: string
+        optional: true
+        name: value
+        unit: h
+        range:
+          min: 0
+          max: 24
+  - entity: sensor
+    name: Countdown left
+    category: diagnostic
+    icon: "mdi:counter"
+    dps:
+      - id: 22
+        name: sensor
+        type: integer
+  - entity: sensor
+    name: Usages counter
+    category: diagnostic
+    icon: "mdi:counter"
+    dps:
+      - id: 101
+        name: sensor
+        type: integer
+  - entity: sensor
+    name: Total time
+    category: diagnostic
+    icon: "mdi:timer"
+    dps:
+      - id: 102
+        name: sensor
+        type: integer
+  - entity: sensor
+    name: Electricity
+    category: diagnostic
+    icon: "mdi:check-circle"
+    dps:
+      - id: 103
+        name: sensor
+        type: integer
+  - entity: sensor
+    name: Electricity counter
+    category: diagnostic
+    icon: "mdi:counter"
+    dps:
+      - id: 104
+        name: sensor
+        type: integer
+        optional: true
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 105
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: celsius
+          - dps_val: f
+            value: fahrenheit
+  - entity: select
+    name: Horizontal
+    icon: "mdi:arrow-left-right"
+    category: config
+    dps:
+      - id: 106
+        type: string
+        name: option
+        mapping:
+          - dps_val: "off"
+            value: "Off"
+          - dps_val: same
+            value: Focus
+          - dps_val: opposite
+            value: Diffuse
+  - entity: select
+    name: Vertical
+    category: config
+    icon: "mdi:arrow-up-down"
+    dps:
+      - id: 107
+        type: string
+        name: option
+        mapping:
+          - dps_val: "off"
+            value: "Off"
+          - dps_val: "15"
+            value: "Swing"
+          - dps_val: "1"
+            value: "1"
+          - dps_val: "2"
+            value: "2"
+          - dps_val: "3"
+            value: "3"
+          - dps_val: "4"
+            value: "4"
+          - dps_val: "5"
+            value: "5"
+  - entity: switch
+    name: Swing 3d
+    icon: "mdi:arrow-all"
+    category: config
+    dps:
+      - id: 108
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Sleep
+    category: config
+    icon: "mdi:power-sleep"
+    dps:
+      - id: 109
+        name: switch
+        type: boolean
+  - entity: switch
+    name: Health
+    icon: "mdi:sprout-outline"
+    dps:
+      - id: 110
+        name: switch
+        type: boolean
+  - entity: switch
+    name: Clean
+    icon: "mdi:vacuum"
+    dps:
+      - id: 111
+        name: switch
+        type: boolean
+  - entity: sensor
+    name: Model
+    category: diagnostic
+    icon: "mdi:auto-mode"
+    dps:
+      - id: 112
+        name: sensor
+        type: string
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    icon: "mdi:check-circle-outline"
+    dps:
+      - id: 20
+        type: bitfield
+        name: sensor
+      - id: 113
+        type: bitfield
+        name: sensor
+  - entity: sensor
+    name: Current mode
+    category: diagnostic
+    icon: "mdi:auto-mode"
+    dps:
+      - id: 114
+        name: sensor
+        type: string
+        optional: true
+  - entity: switch
+    name: 8 degrees of heating
+    icon: "mdi:dice-d8-outline"
+    dps:
+      - id: 115
+        name: switch
+        type: boolean