name: Fan
products:
  - id: rklgm99ldz4unh5s
    manufacturer: Arlec
    model: ATF1006HA
    name: Tower fan
entities:
  - entity: fan
    translation_only_key: fan_with_presets
    dps:
      - id: 1
        name: switch
        type: boolean
      - id: 2
        name: preset_mode
        type: string
        mapping:
          - dps_val: normal
            value: normal
          - dps_val: nature
            value: nature
          - dps_val: sleep
            value: sleep
      - id: 3
        name: speed
        type: string
        mapping:
          - dps_val: "1"
            value: 8
          - dps_val: "2"
            value: 17
          - dps_val: "3"
            value: 25
          - dps_val: "4"
            value: 33
          - dps_val: "5"
            value: 42
          - dps_val: "6"
            value: 50
          - dps_val: "7"
            value: 58
          - dps_val: "8"
            value: 67
          - dps_val: "9"
            value: 75
          - dps_val: "10"
            value: 83
          - dps_val: "11"
            value: 92
          - dps_val: "12"
            value: 100
      - id: 102
        name: oscillate
        type: boolean
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 6
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: cancel
          - dps_val: "1"
            value: "1h"
          - dps_val: "2"
            value: "2h"
          - dps_val: "3"
            value: "3h"
          - dps_val: "4"
            value: "4h"
          - dps_val: "5"
            value: "5h"
          - dps_val: "6"
            value: "6h"
          - dps_val: "7"
            value: "7h"
          - dps_val: "8"
            value: "8h"
          - dps_val: "9"
            value: "9h"
          - dps_val: "10"
            value: "10h"
          - dps_val: "11"
            value: "11h"
          - dps_val: "12"
            value: "12h"
          - dps_val: "13"
            value: "13h"
          - dps_val: "14"
            value: "14h"
          - dps_val: "15"
            value: "15h"
          - dps_val: "16"
            value: "16h"
          - dps_val: "17"
            value: "17h"
          - dps_val: "18"
            value: "18h"
          - dps_val: "19"
            value: "19h"
          - dps_val: "20"
            value: "20h"
          - dps_val: "21"
            value: "21h"
          - dps_val: "22"
            value: "22h"
          - dps_val: "23"
            value: "23h"
          - dps_val: "24"
            value: "24h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 7
        type: integer
        name: sensor
        unit: min
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 8
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 8
        type: bitfield
        name: fault_code
  - entity: sensor
    class: temperature
    category: diagnostic
    dps:
      - id: 19
        type: integer
        name: sensor
        unit: C
        class: measurement
  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 9
        type: boolean
        name: switch
