name: Air Conditioner
products:
  - id: 9xvzf8c0bg33eenj
    name: Inventor AC
  - id: keycnvksyhjcrg8t
    name: Inventor Comfort MFV
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: auto
              value: heat_cool
            - dps_val: cold
              value: cool
            - dps_val: wet
              value: dry
            - dps_val: hot
              value: heat
            - dps_val: wind
              value: fan_only
    - id: 2
      type: integer
      name: temperature
      range:
        min: 16
        max: 30
      mapping:
        - constraint: temperature_unit
          conditions:
            - dps_val: f
              range:
                min: 64
                max: 86
              value_redirect: temp_set_f
    - id: 3
      type: integer
      name: current_temperature
      mapping:
        - scale: 2
          constraint: temperature_unit
          conditions:
            - dps_val: f
              scale: 1
              value_redirect: temp_current_f
    - id: 4
      type: string
      name: mode
      hidden: true
    - id: 5
      type: string
      name: fan_mode
      mapping:
        - dps_val: auto
          value: auto
        - dps_val: low
          value: low
        - dps_val: mid
          value: medium
        - dps_val: high
          value: high
    - id: 18
      type: integer
      name: current_humidity
    - id: 19
      type: string
      name: temperature_unit
      mapping:
        - dps_val: c
          value: C
        - dps_val: f
          value: F
    - id: 23
      type: integer
      name: temp_current_f
      optional: true
      hidden: true
    - id: 24
      type: integer
      name: temp_set_f
      range:
        min: 64
        max: 86
      optional: true
      hidden: true
    - id: 111
      type: boolean
      name: new_style
    - id: 117
      type: string
      name: swing_mode
      mapping:
        - dps_val: ud_0c
          constraint: horizontal_swing
          conditions:
            - dps_val: lr_07
              value: both
            - dps_val: lr_00
              value: vertical
        - dps_val: ud_00
          constraint: horizontal_swing
          conditions:
            - dps_val: lr_07
              value: horizontal
            - dps_val: lr_00
              value: "off"
    - id: 118
      type: string
      name: horizontal_swing
      hidden: true
    - id: 101
      type: boolean
      name: mood_lighting
      optional: true
    - id: 103
      type: integer
      name: co2
      optional: true
    - id: 104
      type: integer
      name: volatile_organic_compounds
      optional: true
    - id: 112
      type: integer
      name: power
      optional: true
secondary_entities:
  - entity: switch
    name: Emergency heat
    icon: "mdi:fire"
    dps:
      - id: 12
        type: boolean
        name: switch
  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 13
        type: boolean
        name: switch
  - 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: pm25
    category: diagnostic
    dps:
      - id: 102
        type: integer
        name: sensor
        unit: ugm3
        class: measurement
      - id: 105
        type: string
        name: air_quality

  - entity: switch
    name: Quiet
    category: config
    icon: "mdi:music-off"
    dps:
      - id: 108
        type: boolean
        name: switch
  - entity: switch
    translation_key: sleep
    category: config
    dps:
      - id: 109
        type: boolean
        name: switch
        optional: true
  - entity: switch
    name: Health
    category: config
    icon: "mdi:shield-bug"
    dps:
      - id: 106
        type: boolean
        name: switch
        optional: true
  - entity: switch
    name: Turbo
    category: config
    icon: "mdi:car-turbocharger"
    dps:
      - id: 107
        type: boolean
        name: switch
        optional: true
  - entity: switch
    translation_key: anti_frost
    dps:
      - id: 110
        type: boolean
        name: switch
  - entity: select
    name: Motion detection
    category: config
    icon: "mdi:motion-sensor"
    dps:
      - id: 113
        type: string
        name: option
        mapping:
          - dps_val: cancel
            value: Cancel
          - dps_val: avoid
            value: Avoid
          - dps_val: follow
            value: Follow
  - entity: switch
    name: Self clean
    icon: "mdi:spray-bottle"
    dps:
      - id: 114
        type: boolean
        name: switch
  - entity: select
    name: Vertical swing
    category: config
    icon: "mdi:arrow-up-down-bold"
    dps:
      - id: 117
        type: string
        name: option
        mapping:
          - dps_val: ud_02
            value: Top
          - dps_val: ud_04
            value: Upper
          - dps_val: ud_06
            value: Middle
          - dps_val: ud_08
            value: Lower
          - dps_val: ud_0a
            value: Bottom
          - dps_val: ud_0c
            value: Swing
          - dps_val: ud_00
            value: Stop Swing
          - dps_val: ud_01
            value: Health Air Flow (Cool)
          - dps_val: ud_03
            value: Health Air Flow (Heat)
  - entity: select
    name: Horizontal swing
    category: config
    icon: "mdi:arrow-left-right-bold"
    dps:
      - id: 118
        type: string
        name: option
        mapping:
          - dps_val: lr_03
            value: Leftmost
          - dps_val: lr_04
            value: Left
          - dps_val: lr_00
            value: Middle
          - dps_val: lr_05
            value: Right
          - dps_val: lr_06
            value: Rightmost
          - dps_val: lr_07
            value: Swing
          - dps_val: lr_00
            value: Stop Swing
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 116
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 116
        type: bitfield
        name: fault_code
  - entity: switch
    name: Anti mould
    icon: "mdi:pot-steam"
    dps:
      - id: 119
        type: boolean
        name: switch
