name: StarLight heatpump
primary_entity:
  entity: climate
  translation_only_key: aircon_extra
  dps:
    - id: 1
      name: hvac_mode
      type: boolean
      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: hot
              value: heat
            - dps_val: wind
              value: fan_only
            - dps_val: wet
              value: dry
    - id: 2
      name: temperature
      type: integer
      unit: C
      range:
        min: 160
        max: 310
      mapping:
        - scale: 10
          step: 5
          constraint: mode
          conditions:
            - dps_val: wet
              invalid: true
            - dps_val: wind
              invalid: true
    - id: 3
      name: current_temperature
      type: integer
    - id: 4
      name: mode
      type: string
      hidden: true
    - id: 5
      name: fan_mode
      type: string
      mapping:
        - dps_val: auto
          value: auto
        - dps_val: mute
          value: quiet
        - dps_val: low
          value: low
        - dps_val: mid_low
          value: medlow
        - dps_val: mid
          value: medium
        - dps_val: mid_high
          value: medhigh
        - dps_val: high
          value: high
        - dps_val: strong
          value: strong
    - id: 20
      name: fault_code
      type: bitfield
    - id: 105
      name: sleep_mode
      type: string
    - id: 110
      name: flags
      type: bitfield
    - id: 113
      name: swing_mode
      type: string
      mapping:
        - dps_val: "0"
          constraint: horizontal_swing
          conditions:
            - dps_val: "0"
              value: "off"
            - dps_val: "1"
              value: horizontal
            - dps_val: ["2", "3", "4"]
              value: horizontal
              hidden: true
        - dps_val: "1"
          constraint: horizontal_swing
          conditions:
            - dps_val: "0"
              value: vertical
            - dps_val: "1"
              value: both
            - dps_val: ["2", "3", "4"]
              value: both
              hidden: true
        - value: both
          hidden: true
          constraint: horizontal_swing
          conditions:
            - dps_val: "0"
              value: vertical
    - id: 114
      name: horizontal_swing
      type: string
      hidden: true
    - id: 119
      name: electricity_management
      type: string
    - id: 120
      name: gen_mode
      type: string
    - id: 123
      name: flags_2
      type: hex
    - id: 126
      name: vertical_flow_position
      type: string
    - id: 127
      name: horizontal_flow_position
      type: string
    - id: 128
      name: model_code
      type: string
    - id: 129
      name: energy
      type: string
    - id: 130
      name: eco_temp
      type: integer
    - id: 132
      name: hot_cool
      type: boolean
    - id: 133
      name: swing_action
      type: string
    - id: 134
      name: statistics
      type: json
secondary_entities:
  - entity: sensor
    category: diagnostic
    class: humidity
    dps:
      - id: 18
        name: sensor
        type: integer
        unit: "%"
        class: measurement
  - entity: select
    name: Vertical swing
    category: config
    icon: "mdi:arrow-up-down-bold"
    dps:
      - id: 113
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: "Off"
          - dps_val: "1"
            value: Full
          - dps_val: "2"
            value: Upper
          - dps_val: "3"
            value: Lower
  - entity: select
    name: Vertical position
    category: config
    icon: "mdi:unfold-more-horizontal"
    dps:
      - id: 126
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: Unknown
          - dps_val: "1"
            value: Top
          - dps_val: "2"
            value: Slightly Up
          - dps_val: "3"
            value: Middle
          - dps_val: "4"
            value: Slightly Down
          - dps_val: "5"
            value: Bottom
  - entity: select
    name: Horizontal swing
    category: config
    icon: "mdi:arrow-left-right-bold"
    dps:
      - id: 114
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: "Off"
          - dps_val: "1"
            value: Full
          - dps_val: "2"
            value: Left
          - dps_val: "3"
            value: Center
          - dps_val: "4"
            value: Right
  - entity: select
    name: Horizontal position
    category: config
    icon: "mdi:unfold-more-vertical"
    dps:
      - id: 127
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: Unknown
          - dps_val: "1"
            value: Leftmost
          - dps_val: "2"
            value: Slight Left
          - dps_val: "3"
            value: Center
          - dps_val: "4"
            value: Slight Right
          - dps_val: "5"
            value: Rightmost
  - entity: select
    name: Sleep mode
    category: config
    icon: "mdi:weather-night"
    dps:
      - id: 105
        type: string
        name: option
        mapping:
          - dps_val: "off"
            value: "Off"
          - dps_val: "normal"
            value: Standard
          - dps_val: "old"
            value: "Elderly"
          - dps_val: "child"
            value: "Child"
  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 123
        type: hex
        name: switch
        mapping:
          - mask: "0008"
  - entity: switch
    name: Buzzer
    category: config
    icon: "mdi:access-point"
    dps:
      - id: 123
        type: hex
        name: switch
        mapping:
          - mask: "0010"
  - entity: switch
    name: Soft wind
    category: config
    icon: "mdi:weather-windy"
    dps:
      - id: 123
        type: hex
        name: switch
        mapping:
          - mask: "8000"
  - entity: switch
    name: Anti-mildew
    category: config
    icon: "mdi:water-off-outline"
    dps:
      - id: 123
        type: hex
        name: switch
        mapping:
          - mask: "0100"
  - entity: switch
    name: Health
    category: config
    icon: "mdi:heart-outline"
    dps:
      - id: 123
        type: hex
        name: switch
        mapping:
          - mask: "0020"
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 123
        type: hex
        name: switch
        mapping:
          - mask: "1000"
  - entity: switch
    name: Eco mode
    category: config
    icon: "mdi:leaf"
    dps:
      - id: 123
        type: hex
        name: switch
        mapping:
          - mask: "0001"
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 20
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
  - entity: binary_sensor
    name: Filter
    class: problem
    category: diagnostic
    dps:
      - id: 131
        type: boolean
        name: sensor
