name: Ceiling fan
products:
  - id: k8j78n65zeu3orz7
    manufacturer: Eglo
    model: Surf
entities:
  - entity: fan
    translation_only_key: fan_with_presets
    dps:
      - id: 60
        type: boolean
        name: switch
      - id: 61
        type: string
        optional: true
        name: preset_mode
        mapping:
          - dps_val: fresh
            value: fresh
            available: preset_supported
          - dps_val: nature
            value: nature
            available: preset_supported
      - id: 61
        type: string
        optional: true
        name: preset_supported
        mapping:
          - dps_val: null
            value: false
          - value: true
      - id: 62
        type: integer
        name: speed
        mapping:
          - dps_val: 0
            value: 0
          - dps_val: 1
            value: 20
          - dps_val: 2
            value: 40
          - dps_val: 3
            value: 60
          - dps_val: 4
            value: 80
          - dps_val: 5
            value: 100
            # Sleep mode - extra slow
          - dps_val: -1
            value: 10
      - id: 63
        type: string
        name: direction
  - entity: number
    translation_key: timer
    class: duration
    category: config
    dps:
      - id: 64
        type: integer
        name: value
        range:
          min: 0
          max: 540
        unit: min
  - entity: light
    hidden: unavailable
    dps:
      - id: 20
        type: boolean
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
      - id: 20
        type: boolean
        optional: true
        name: switch
      - id: 22
        type: integer
        optional: true
        name: brightness
        range:
          min: 10
          max: 1000
      - id: 23
        type: integer
        optional: true
        name: color_temp
        range:
          min: 0
          max: 1000
        mapping:
          - target_range:
              min: 3000
              max: 5000
            step: 500
  - entity: time
    name: Light timer
    hidden: unavailable
    dps:
      - id: 20
        type: boolean
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
      - id: 26
        type: integer
        optional: true
        name: second
        range:
          min: 0
          max: 86399
