name: Light and fan
products:
  - id: u5ovvhurbvynvspv
    manufacturer: Ledkia
    name: Fan and light controller
  - id: 6xxhlgqzuqgytuy
    manufacturer: Tamoor
    model: FG-6890
entities:
  - entity: fan
    dps:
      - id: 60
        type: boolean
        name: switch
      - id: 62
        type: integer
        name: speed
        optional: true
        range:
          min: 1
          max: 6
      - id: 63
        type: string
        name: direction
  - entity: light
    dps:
      - id: 20
        type: boolean
        name: switch
      - id: 21
        type: string
        name: effect
        mapping:
          - dps_val: white
            value: "off"
          - dps_val: scene
            value: Scene
          - value: "off"
            hidden: true
      - 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
  - entity: text
    translation_key: scene
    category: config
    hidden: true
    dps:
      - id: 25
        type: hex
        optional: true
        name: value

  - entity: number
    name: Minimum brightness
    icon: "mdi:brightness-6"
    category: config
    hidden: unavailable
    dps:
      - id: 58
        type: integer
        name: value
        unit: "%"
        optional: true
        range:
          min: 10
          max: 1000
        mapping:
          - scale: 10
      - id: 58
        type: integer
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: select
    name: Light type
    category: config
    hidden: unavailable
    dps:
      - id: 59
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: led
            value: LED
          - dps_val: incandescent
            value: Incandescent
          - dps_val: halogen
            value: Halogen
      - id: 59
        type: string
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
  - entity: number
    name: Fan timer
    class: duration
    translation_key: timer
    category: config
    dps:
      - id: 64
        type: integer
        name: value
        range:
          min: 0
          max: 540
        unit: min
  - entity: switch
    translation_key: sound
    category: config
    hidden: true
    dps:
      - id: 66
        type: boolean
        optional: true
        name: switch
      - id: 66
        type: boolean
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
