name: Ceiling fan
primary_entity:
  entity: fan
  dps:
    - id: 1
      type: boolean
      name: switch
    - id: 3
      type: string
      name: speed
      mapping:
        - dps_val: "1"
          value: 3
        - dps_val: "2"
          value: 6
        - dps_val: "3"
          value: 9
        - dps_val: "4"
          value: 13
        - dps_val: "5"
          value: 16
        - dps_val: "6"
          value: 19
        - dps_val: "7"
          value: 22
        - dps_val: "8"
          value: 25
        - dps_val: "9"
          value: 28
        - dps_val: "10"
          value: 31
        - dps_val: "11"
          value: 34
        - dps_val: "12"
          value: 38
        - dps_val: "13"
          value: 41
        - dps_val: "14"
          value: 44
        - dps_val: "15"
          value: 47
        - dps_val: "16"
          value: 50
        - dps_val: "17"
          value: 53
        - dps_val: "18"
          value: 56
        - dps_val: "19"
          value: 59
        - dps_val: "20"
          value: 63
        - dps_val: "21"
          value: 66
        - dps_val: "22"
          value: 69
        - dps_val: "23"
          value: 72
        - dps_val: "24"
          value: 75
        - dps_val: "25"
          value: 78
        - dps_val: "26"
          value: 81
        - dps_val: "27"
          value: 84
        - dps_val: "28"
          value: 88
        - dps_val: "29"
          value: 91
        - dps_val: "30"
          value: 94
        - dps_val: "31"
          value: 97
        - dps_val: "32"
          value: 100
    - id: 101
      type: boolean
      name: direction
      mapping:
        - dps_val: false
          value: forward
        - dps_val: true
          value: reverse
secondary_entities:
  - entity: select
    translation_key: timer
    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"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 7
        type: integer
        name: sensor
        unit: min
  - entity: light
    dps:
      - id: 9
        type: boolean
        name: switch
      - id: 10
        name: brightness
        type: integer
        range:
          min: 10
          max: 1000
      - id: 11
        name: color_temp
        type: integer
        range:
          min: 0
          max: 1000
        mapping:
          - target_range:
              min: 2700
              max: 5000
