name: Air conditioner
products:
  - id: wxqdp6ecfkd78zzz
    name: Tesla TYAUX F/LM/J
primary_entity:
  entity: climate
  dps:
    - id: 1
      type: boolean
      name: hvac_mode
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          constraint: mode
          conditions:
            - dps_val: cold
              value: cool
            - dps_val: hot
              value: heat
            - dps_val: wet
              value: dry
            - dps_val: wind
              value: fan_only
            - dps_val: auto
              value: heat_cool
    - id: 2
      type: integer
      name: temperature
      range:
        min: 160
        max: 320
      mapping:
        - scale: 10
          step: 5
          constraint: temperature_unit
          conditions:
            - dps_val: F
              range:
                min: 600
                max: 900
    - id: 3
      type: integer
      name: current_temperature
      mapping:
        - scale: 10
    - id: 4
      name: mode
      type: string
      hidden: true
    - id: 5
      type: string
      name: fan_mode
      mapping:
        - dps_val: mute
          value: "off"
        - dps_val: low
          value: low
        - dps_val: mid
          value: medium
        - dps_val: high
          value: high
        - dps_val: auto
          value: auto
    - id: 8
      type: boolean
      name: preset_mode
      mapping:
        - dps_val: true
          value: eco
        - dps_val: false
          value: comfort
    - id: 19
      type: string
      name: temperature_unit
    - id: 33
      type: boolean
      name: swing_mode
      mapping:
        - dps_val: false
          constraint: swing_vert
          conditions:
            - dps_val: false
              value: "off"
            - dps_val: true
              value: vertical
        - dps_val: true
          constraint: swing_vert
          conditions:
            - dps_val: false
              value: horizontal
            - dps_val: true
              value: both
    - id: 105
      type: boolean
      name: swing_vert
      hidden: true
    - id: 107
      type: bitfield
      name: fault_code
    - id: 108
      type: bitfield
      name: model
secondary_entities:
  - entity: switch
    name: Emergency heat
    category: config
    dps:
      - id: 12
        type: boolean
        name: switch
  - entity: light
    translation_key: backlight
    category: config
    dps:
      - id: 13
        type: boolean
        name: switch
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 14
        type: boolean
        name: lock
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 19
        type: string
        name: option
        mapping:
          - dps_val: C
            value: celsius
          - dps_val: F
            value: fahrenheit
  - entity: sensor
    class: energy
    category: diagnostic
    dps:
      - id: 28
        type: integer
        name: sensor
        unit: kWh
        class: total_increasing
  - entity: switch
    translation_key: sleep
    category: config
    dps:
      - id: 102
        type: boolean
        name: switch
  - entity: switch
    name: Clean
    icon: "mdi:shimmer"
    category: config
    dps:
      - id: 103
        type: boolean
        name: switch
  - entity: switch
    name: Anti-mould
    icon: "mdi:water-off"
    category: config
    dps:
      - id: 104
        type: boolean
        name: switch
  - entity: switch
    translation_key: uv_sterilization
    category: config
    dps:
      - id: 106
        type: boolean
        name: switch
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 107
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
  - entity: switch
    name: "On timer"
    translation_key: timer
    category: config
    dps:
      - id: 109
        type: boolean
        name: switch
  - entity: switch
    name: "Off timer"
    translation_key: timer
    category: config
    dps:
      - id: 110
        type: boolean
        name: switch
  - entity: number
    name: Timer hours
    category: config
    translation_key: timer
    dps:
      - id: 111
        type: integer
        name: value
        unit: h
        range:
          min: 0
          max: 23
  - entity: number
    name: Timer minutes
    category: config
    translation_key: timer
    dps:
      - id: 112
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 59
  - entity: number
    name: Power limit
    icon: "mdi:meter-electric-outline"
    category: diagnostic
    dps:
      - id: 113
        type: integer
        name: value
        optional: true
        unit: "%"
        range:
          min: 30
          max: 100
        mapping:
          - dps_val: null
            value: 100
            hidden: true
  - entity: switch
    name: Limit power
    icon: "mdi:meter-electric-outline"
    category: config
    dps:
      - id: 114
        type: boolean
        name: switch
