name: Ceiling fan with light
products:
  - id: zfwgeelmqcypcdgh
    name: Orison Chanfok Neo
primary_entity:
  entity: fan
  dps:
    - id: 107
      type: boolean
      name: switch
    - id: 106
      name: preset_mode
      type: string
      mapping:
        - dps_val: fresh
          value: fresh
        - dps_val: nature
          value: nature
    - id: 105
      type: integer
      name: speed
      optional: true
      range:
        min: 1
        max: 6
    - id: 104
      type: string
      name: direction
secondary_entities:
  - entity: light
    dps:
      - id: 20
        type: boolean
        name: switch
      - id: 21
        type: string
        name: color_mode
        mapping:
          - dps_val: white
            value: color_temp
          - dps_val: colour
            value: hs
          - dps_val: scene
            value: Scene
          - dps_val: music
            value: Music
      - id: 22
        type: integer
        name: brightness
        range:
          min: 10
          max: 1000
      - id: 23
        type: integer
        name: color_temp
        range:
          min: 0
          max: 1000
        optional: true
        mapping:
          - step: 500
            target_range:
              min: 2700
              max: 6500
      - id: 24
        name: rgbhsv
        type: hex
        format:
          - name: h
            bytes: 2
            range:
              min: 0
              max: 360
          - name: s
            bytes: 2
            range:
              min: 0
              max: 1000
          - name: v
            bytes: 2
            range:
              min: 0
              max: 1000
      - id: 51
        type: string
        optional: true
        name: mix_rgbcw
  - entity: number
    name: Light timer
    translation_key: timer
    category: config
    dps:
      - id: 26
        type: integer
        name: value
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
        unit: min
  - entity: number
    name: Fan timer
    translation_key: timer
    category: config
    dps:
      - id: 103
        type: integer
        name: value
        range:
          min: 0
          max: 540
        unit: min
  - entity: switch
    translation_key: keytone
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: light
    translation_key: nightlight
    category: config
    dps:
      - id: 53
        type: boolean
        name: switch
  - entity: select
    name: Scene
    category: config
    icon: "mdi:palette"
    dps:
      - id: 36
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "AAABAQIODQAAyAAAAAA="
            value: Night
          - dps_val: "AAEBAQIODQAD6AH0AAA="
            value: Reading
          - dps_val: "AAIBAQIODQAD6APoAAA="
            value: Work
          - dps_val: "AAMBAQIODQAB9AH0AAA="
            value: Casual
          - dps_val: "AAQAAAECA0ZGAgB4A+gD6EZGAgB4A+gACg=="
            value: Prairie
          - dps_val: "AAUAAAEGA0ZGAQAAA+gD6EZGAQB4A+gD6EZGAQDwA+gD6EZGAQA9A+gD\
              6EZGAQCuA+gD6EZGAQETA+gD6A=="
            value: Fun
          - dps_val: "AAYAAAEDA0ZGAQAAA+gD6EZGAQB4A+gD6EZGAQDwA+gD6A=="
            value: Dazzle
          - dps_val: "AAcAAAEGA0ZGAgAAA+gD6EZGAgB4A+gD6EZGAgDwA+gD6EZGAgA9A+gD\
              6EZGAgCuA+gD6EZGAgETA+gD6A=="
            value: Colorful
          - dps_val: "ABQAAAEDA0ZGAgCuA+gD6EZGAgC0ASwD6EZGAgC0ADID6A=="
            value: Blue Sky
          - dps_val: "AB0AAAEEA2RkAQAAA+gD6GRkAQDwA+gD6GRkAgB4A+gD6GRkAgA9A+gD\
              6A=="
            value: Mediterranean
          - dps_val: "ACAAAAEGA2RkAQA9A+gD6GRkAQB4A+gD6FpaAQETA+gD6FpaAQCuA+gD\
              6GRkAQAyAfQD6GRkAQAAA+gD6A=="
            value: Birthday
          - dps_val: "ACIAAAEGA1paAQDwA+gD6FpaAQA9A+gD6EZGAQAAA+gD6FpaAQCuA+gD\
              6FpaAQETA+gD6EZGAQB4A+gD6A=="
            value: Christmas
          - dps_val: "ADIBAQIODQAAyAAAAQYDRkYCAAAD6APoRkYCAHgD6APoRkYCAPAD6APo\
              RkYCAD0D6APoRkYCAK4D6APoRkYCARMD6APo"
            value: Streamer
          - dps_val: "ADMBAQIODQAB9AH0AQYDRkYBAAAD6APoRkYBAHgD6APoRkYBAPAD6APo\
              RkYBAD0D6APoRkYBAK4D6APoRkYBARMD6APo"
            value: Entertainment
