Răsfoiți Sursa

Add device configuration files for supported devices.

Provides yaml configuration descriptor files that will be used to clean up the code and make adding new devices easier.

Fixes T19.
Jason Rumney 4 ani în urmă
părinte
comite
ab399ed78a

+ 0 - 0
custom_components/tuya_local/devices/__init__.py


+ 43 - 0
custom_components/tuya_local/devices/andersson_gsh_heater.yaml

@@ -0,0 +1,43 @@
+name: Andersson GSH Heater
+legacy_type: gsh_heater
+primary_device:
+  entity: climate
+  legacy_class: ".gsh_heater.climate.AnderssonGSHHeater"
+  dps:
+    - id: 1
+      name: hvac_mode
+      type: boolean
+      mapping:
+        - dps_val: true
+          value: "heat"
+          icon: "mdi:radiator"
+        - dps_val: false
+          value: "off"
+          icon: "mdi:radiator-disabled"
+    - id: 2
+      name: temperature
+      type: integer
+      range:
+        min: 5
+        max: 35
+    - id: 3
+      name: current_temperature
+      type: integer
+      readonly: true
+    - id: 4
+      name: preset_mode
+      type: string
+      mapping:
+        - dps_val: "low"
+          value: "Low"
+        - dps_val: "high"
+          value: "High"
+        - dps_val: "af"
+          value: "Anti-freeze"
+    - id: 12
+      name: error
+      type: bitfield
+      mapping:
+        - dps_val: 0
+          value: "OK"
+      readonly: true

+ 36 - 0
custom_components/tuya_local/devices/eurom_600_heater.yaml

@@ -0,0 +1,36 @@
+name: Eurom Mon Soleil 600 Heater
+legacy_type: eurom_heater
+primary_device:
+  entity: climate
+  legacy_class: ".eurom_600_heater.climate.EuromMonSoleil600Heater"
+  dps:
+    - id: 1
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+          icon: "mdi:radiator-disabled"
+          icon_priority: 1
+        - dps_val: true
+          value: "heat"
+          icon: "mdi:radiator"
+          icon_priority: 3
+      name: hvac_mode
+    - id: 2
+      type: integer
+      range:
+        min: 15
+        max: 35
+      name: temperature
+    - id: 5
+      type: integer
+      readonly: true
+      name: current_temperature
+    - id: 6
+      type: bitfield
+      mapping:
+        - dps_val: 0
+          value: "OK"
+      readonly: true
+      name: error
+      

+ 53 - 0
custom_components/tuya_local/devices/gardenpac_heatpump.yaml

@@ -0,0 +1,53 @@
+name: GardenPAC Pool Heatpump
+legacy_type: gardenpac_heatpump
+primary_device:
+  entity: climate
+  legacy_class: ".gardenpac_heatpump.climate.GardenPACPoolHeatpump"
+  dps:
+    - id: 1
+      name: hvac_mode
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+          icon: "mdi:radiator-disabled"
+          icon_priority: 1
+        - dps_val: true
+          value: "heat"
+          icon: "mdi:hot-tub"
+          icon_priority: 3
+    - id: 102
+      name: current_temperature
+      type: integer
+      readonly: true
+    - id: 103
+      name: temperature_units
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: F
+        - dps_val: true
+          value: C
+    - id: 104
+      name: power_level
+      type: integer
+      readonly: true
+    - id: 105
+      name: operating_mode
+      type: integer
+      readonly: true
+    - id: 106
+      name: temperature
+      type: integer
+      range:
+        min: 18
+        max: 45
+    - id: 117
+      name: preset_mode
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: Silent
+        - dps_val: true
+          value: Smart
+        

+ 94 - 0
custom_components/tuya_local/devices/goldair_dehumidifier.yaml

@@ -0,0 +1,94 @@
+name: Goldair Dehumidifier
+legacy_type: dehumidifier
+primary_device:
+  entity: climate
+  legacy_class: ".dehumidifier.climate.GoldairDehumidifier"
+  dps:
+    - id: 1
+      type: boolean
+      mapping:
+        - dps_val: False
+          value: "off"
+          icon: mdi:air-humidifier
+          icon_priority: 3
+        - dps_val: True
+          value: "dry"
+          icon: mdi:air-humidifier
+          icon_priority: 5
+      name: hvac_mode
+    - id: 2
+      type: string
+      mapping:
+        - dps_val: "0"
+          value: "Normal"
+        - dps_val: "1"
+          value: "Low"
+        - dps_val: "2"
+          value: "High"
+        - dps_val: "3"
+          value: "Dry clothes"
+          icon: "mdi:tshirt-crew-outline"
+          icon_priority: 4
+      name: preset_mode
+    - id: 4
+      type: integer
+      name: humidity
+    - id: 5
+      type: boolean
+      name: air_clean_on
+    - id: 6
+      type: string
+      mapping:
+        - dps_val: "1"
+          value: "low"
+        - dps_val: "3"
+          value: "high"
+      name: fan_mode
+    - id: 11
+      type: bitfield
+      mapping:
+        - dps_val: 8
+          value: "Tank full or missing"
+          icon: "mdi:cup-water"
+          icon_priority: 1
+        - dps_val: 0
+          value: "OK"
+      name: error
+      readonly: true
+      - id: 103
+      name: current_temperature
+      readonly: true
+    - id: 104
+      type: integer
+      name: current_humidity
+      readonly: true
+    - id: 105
+      type: boolean
+      name: defrosting
+      mapping:
+        dps_val: true
+        icon: "mdi:snowflake-melt"
+        icon_priority: 2
+      readonly: true
+secondary_devices:
+  - entity: light
+    legacy_class: ".dehumidifier.light.GoldairDehumifierLedDisplayLight"
+    name: Panel Light
+    dps:
+      - id: 102
+        type: boolean
+        mapping:
+          - dps_val: false
+            value: true
+            icon: "mdi:led-on"
+          - dps_val: true
+            value: false
+            icon: "mdi:led-off"
+        name: switch
+  - entity: lock
+    legacy_class: ".dehumidifier.lock.GoldairDehumidifierChildLock"
+    name: Child Lock
+    dps:
+      - id: 7
+        type: boolean
+        name: lock

+ 71 - 0
custom_components/tuya_local/devices/goldair_fan.yaml

@@ -0,0 +1,71 @@
+name: Goldair Fan
+legacy_type: fan
+primary_device:
+  entity: climate
+  legacy_class: ".fan.climate.GoldairFan"
+  icon: "mdi:fan"
+  dps:
+    - id: 1
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          value: "fan_only"
+      name: hvac_mode
+    - id: 2
+      type: integer
+      range:
+        constraint: preset_mode
+        conditions:
+          - value: normal
+            min: 1
+            max: 12
+          - value: eco
+            mapping:
+              - dps_val: 4
+                value: low
+              - dps_val: 8
+                value: medium
+              - dps_val: 12
+                value: high
+          - value: sleep
+            mapping:
+              - dps_val: 4
+                value: low
+              - dps_val: 8
+                value: medium
+              - dps_val: 12
+                value: high            
+      name: fan_mode
+    - id: 3
+      type: string
+      mapping:
+        - dps_val: normal
+          value: normal
+        - dps_val: nature
+          value: eco
+        - dps_val: sleep
+          value: sleep
+      name: preset_mode
+    - id: 8
+      type: string
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          value: "horizontal"
+      name: swing_mode
+secondary_devices:
+  - entity: light
+    legacy_class: ".fan.light.GoldairFanLedDisplayLight"
+    name: Panel Light
+    dps:
+      - id: 101
+        type: boolean
+        mapping:
+          - dps_val: false
+            icon: "mdi:led-on"
+          - dps_val: true
+            icon: "mdi:led-off"
+        name: switch

+ 42 - 0
custom_components/tuya_local/devices/goldair_geco_heater.yaml

@@ -0,0 +1,42 @@
+name: Goldair GECO Heater
+legacy_type: geco_heater
+primary_device:
+  entity: climate
+  legacy_class: ".geco_heater.climate.GoldairGECOHeater"
+  dps:
+    - id: 1
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+          icon: "mdi:radiator-disabled"
+        - dps_val: true
+          value: "heat"
+          icon: "mdi:radiator"
+      name: hvac_mode
+    - id: 3
+      type: integer
+      range:
+        min: 15
+        max: 35
+      name: temperature
+    - id: 4
+      type: integer
+      readonly: true
+      name: current_temperature
+    - id: 6
+      type: bitfield
+      mapping:
+        - dps_val: 0
+          value: "OK"
+      readonly: true
+      name: error
+secondary_devices:
+  - entity: lock
+    legacy_class: ".geco_heater.lock.GoldairGECOHeaterChildLock"
+    name: "Child Lock"
+    dps:
+      - id: 2
+        type: boolean
+        name: lock
+

+ 49 - 0
custom_components/tuya_local/devices/goldair_gpcv_heater.yaml

@@ -0,0 +1,49 @@
+name: Goldair GPCV Heater
+legacy_type: gpcv_heater
+primary_device:
+  entity: climate
+  legacy_class: ".gpcv_heater.climate.GoldairGPCVHeater"
+  dps:
+    - id: 1
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+          icon: "mdi:radiator-disabled"
+        - dps_val: true
+          value: "heat"
+          icon: "mdi:radiator"
+      name: hvac_mode
+    - id: 3
+      type: integer
+      range:
+        min: 15
+        max: 35
+      name: temperature
+    - id: 4
+      type: integer
+      readonly: true
+      name: current_temperature
+    - id: 6
+      type: bitfield
+      mapping:
+        dps_val: 0
+        value: "OK"
+      readonly: true
+      name: error
+    - id: 7
+      type: string
+      mapping:
+        - dps_val: "Low"
+          value: "Low"
+        - dps_val: "High"
+          value: "High"
+      name: preset_mode
+secondary_devices:
+  - entity: lock
+    legacy_class: ".gpcv_heater.lock.GoldairGPCVHeaterChildLock"
+    name: "Child Lock"
+    dps:
+      id: 2
+      type: boolean
+      name: lock

+ 109 - 0
custom_components/tuya_local/devices/goldair_gpph_heater.yaml

@@ -0,0 +1,109 @@
+name: Goldair GPPH Heater
+legacy_type: heater
+primary_device:
+  entity: climate
+  legacy_class: ".heater.climate.GoldairHeater"
+  dps:
+    - id: 1
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+          icon: "mdi:radiator-disabled"
+          icon_priority: 1
+        - dps_val: true
+          value: "heat"
+          icon: "mdi:radiator"
+          icon_priority: 3
+      name: hvac_mode
+    - id: 2
+      type: integer
+      range:
+        min: 5
+        max: 35
+      mapping:
+        constraint: preset_mode
+        conditions:
+          - value: eco
+            value-redirect: eco_temperature
+          - value: away
+            invalid: true
+      name: temperature
+    - id: 3
+      type: integer
+      readonly: true
+      name: current_temperature
+    - id: 4
+      type: string
+      mapping:
+        - dps_val: "C"
+          value: "comfort"
+        - dps_val: "ECO"
+          value: "eco"
+        - dps_val: "AF"
+          value: "away"
+      name: preset_mode
+    - id: 12
+      type: bitfield
+      mapping:
+        - dps_val: 0
+          value: OK
+      readonly: true
+      name: error
+    - id: 101
+      type: string
+      mapping:
+        - dps_val: "stop"
+          value: "Stop"
+          icon: "mdi:radiator-disabled"
+          icon_priority: 2
+        - dps_val: "1"
+        - dps_val: "2"
+        - dps_val: "3"
+        - dps_val: "4"
+        - dps_val: "5"
+      name: power_level
+    - id: 105
+      type: string
+      mapping:
+        - dps_val: "stop"
+          value: "Stop"
+        - dps_val: "auto"
+          value: "Auto"
+        - dps_val: "user"
+          value-redirect: power_level
+      name: swing_mode
+    - id: 106
+      value: integer
+      range:
+        min: 5
+        max: 21
+      mapping:
+        constraint: preset_mode
+        conditions:
+          - value: comfort
+            invalid: true
+          - value: away
+            invalid: true
+      hidden: true
+      name: eco_temperature
+secondary_devices:
+  - entity: light
+    legacy_class: ".heater.light.GoldairHeaterLedDisplayLight"
+    name: Panel Light
+    dps:
+      - id: 104
+        type: boolean
+        mapping:
+          - dps_val: false
+            icon: "mdi:led-on"
+          - dps_val: true
+            icon: "mdi:led-off"
+        name: switch
+  - entity: lock
+    legacy_class: ".heater.lock.GoldairHeaterChildLock"
+    name: Child Lock
+    dps:
+      - id: 6
+        type: boolean
+        name: lock

+ 45 - 0
custom_components/tuya_local/devices/kogan_heater.yaml

@@ -0,0 +1,45 @@
+name: Kogan Panel Heater
+legacy_type: kogan_heater
+primary_device:
+  entity: climate
+  legacy_class: ".kogan_heater.climate.KoganHeater"
+  dps:
+    - id: 2
+      type: integer
+      range:
+        min: 15
+        max: 35
+      name: temperature
+    - id: 3
+      type: integer
+      name: current_temperature
+      readonly: true
+    - id: 4
+      type: string
+      mapping:
+        - dps_val: "Low"
+          value: "Low"
+        - dps_val: "High"
+          value: "High"
+      name: preset_mode
+    - id: 7
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+          icon: "mdi:radiator-disabled"
+        - dps_val: true
+          value: "heat"
+          icon: "mdi:radiator"
+      name: hvac_mode
+    - id: 8
+      type: integer
+      name: timer
+secondary_devices:
+  - entity: lock
+    legacy_class: ".kogan_heater.lock.KoganHeaterChildLock"
+    name: "Child Lock"
+    dps:
+      - id: 6
+        type: boolean
+        name: lock

+ 25 - 0
custom_components/tuya_local/devices/kogan_switch.yaml

@@ -0,0 +1,25 @@
+name: Kogan Smart Switch
+legacy_type: kogan_switch
+primary_device:
+  entity: switch
+  legacy_class: ".kogan_socket.switch.KoganSocketSwitch"
+  class: outlet
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 2
+      type: integer
+      name: timer
+    - id: 4
+      type: integer
+      name: current_a
+      readonly: true
+    - id: 5
+      type: integer
+      name: current_power_w
+      readonly: true
+    - id: 6
+      type: integer
+      name: voltage_v
+      readonly: true

+ 25 - 0
custom_components/tuya_local/devices/kogan_switch2.yaml

@@ -0,0 +1,25 @@
+name: Kogan Smart Switch v2
+legacy_type: kogan_switch
+primary_device:
+  entity: switch
+  legacy_class: ".kogan_socket.switch.KoganSocketSwitch"
+  class: outlet
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 9
+      type: integer
+      name: timer
+    - id: 18
+      type: integer
+      name: current_a
+      read-only: true
+    - id: 19
+      type: integer
+      name: current_power_w
+      read-only: true
+    - id: 20
+      type: integer
+      name: voltage_v
+      read-only: true

+ 91 - 0
custom_components/tuya_local/devices/purline_m100_heater.yaml

@@ -0,0 +1,91 @@
+name: Purline Hoti M100 Heater
+legacy_type: purline_m100_heater
+primary_device:
+  entity: climate
+  legacy_class: ".purline_m100_heater.climate.PurlineM100Heater"
+  dps:
+    - id: 1
+      name: hvac_mode
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+          icon: "mdi:radiator-disabled"
+          icon_priority: 1
+        - dps_val: true
+          constraint: preset_mode
+          conditions:
+            - value: Fan
+              value-override: fan_only
+              icon: "mdi:fan"
+              icon_priority: 2
+          value: 
+          value: "heat"
+          icon: "mdi:radiator"
+          icon_priority: 3
+    - id: 2
+      name: temperature
+      type: integer
+      range:
+        min: 15
+        max: 35
+    - id: 3
+      name: current_temperature
+      type: integer
+      readonly: true
+    - id: 5
+      name: preset_mode
+      type: string
+      mapping:
+        - dps_val: "off"
+          value: "Fan"
+        - 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"
+        - dps_val: "auto"
+          value: "Auto"
+    - id: 11
+      name: timer_hours
+      type: integer
+    - id: 12
+      name: timer_remain
+      type: integer
+      readonly: true
+    - id: 102
+      name: swing_mode
+      type: boolean
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          value: "vertical"
+secondary_devices:
+  - entity: light
+    legacy_class: ".purline_m100_heater.light.PurlineM100HeaterLedDisplayLight"
+    name: Panel Light
+    dps:
+      - id: 10
+        type: boolean
+        mapping:
+          - dps_val: true
+            value: false
+            icon: "mdi:led-off"
+          - dps_val: false
+            value: true
+            icon: "mdi:led-on"
+        name: switch
+  - entity: switch
+    legacy_class: ".purline_m100_heater.switch.PurlineM100OpenWindowDetector"
+    name: "Open Window Detector"
+    class: switch
+    dps:
+      - id: 101
+        type: boolean
+        name: switch