name: IR climate control
products:
  - id: fnc1jft20tlgnxdj
    name: Shenzhen Neo Smart Air Conditioner Controller
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: warm
              value: heat
            - dps_val: cold
              value: cool
            - dps_val: wind
              value: fan_only
            - dps_val: dehumidify
              value: dry
            - dps_val: auto
              value: heat_cool
    - id: 2
      type: integer
      name: current_temperature
      mapping:
        - scale: 10
    - id: 3
      type: integer
      name: temperature
      range:
        min: 16
        max: 32
      mapping:
        - constraint: temperature_unit
          conditions:
            - dps_val: f
              range:
                min: 60
                max: 90
    - 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: middle
          value: medium
        - dps_val: high
          value: high
    - id: 6
      type: bitfield
      name: fault_code
      optional: true
    - id: 9
      type: integer
      name: max_temperature
    - id: 10
      type: integer
      name: min_temperature
    - id: 11
      type: string
      name: temperature_unit
      mapping:
        - dps_val: c
          value: C
        - dps_val: f
          value: F
    - id: 12
      type: integer
      name: current_humidity
secondary_entities:
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 6
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: null
            value: false
          - dps_val: 0
            value: false
          - value: true
  - entity: button
    translation_key: filter_reset
    category: config
    dps:
      - id: 7
        type: boolean
        name: button
        optional: true
  - entity: sensor
    name: Filter life
    class: duration
    category: diagnostic
    dps:
      - id: 8
        type: integer
        name: sensor
        unit: h
        optional: true
  - entity: number
    name: Maximum temperature
    category: config
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 9
        type: integer
        name: value
        range:
          min: 20
          max: 40
        mapping:
          - constraint: unit
            conditions:
              - dps_val: f
                range:
                  min: 68
                  max: 104
      - id: 11
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: number
    name: Minimum temperature
    category: config
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 10
        type: integer
        name: value
        range:
          min: 5
          max: 20
        mapping:
          - constraint: unit
            conditions:
              - dps_val: f
                range:
                  min: 41
                  max: 68
      - id: 11
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 101
        type: boolean
        name: lock
        optional: true
