name: Ceiling fan
products:
  - id: twyyic5gptzkhbav
    manufacturer: Globe
    model: 27109-U
entities:
  - entity: fan
    icon: "mdi:ceiling-fan"
    translation_only_key: fan_with_presets
    dps:
      - id: 107
        type: boolean
        name: switch
      - id: 106
        type: string
        name: preset_mode
        mapping:
          - dps_val: sleep
            value: sleep
          - dps_val: nature
            value: nature
      - id: 105
        type: integer
        name: speed
        range:
          min: 1
          max: 6
      - id: 104
        type: string
        name: direction
  - entity: light
    icon: "mdi:ceiling-fan-light"
    dps:
      - id: 20
        type: boolean
        name: switch
      - id: 21
        name: color_mode
        type: string
        mapping:
          - dps_val: white
            value: color_temp
          - dps_val: colour
            value: hs
          - dps_val: scene
            value: Scene
      - id: 22
        name: brightness
        type: integer
        range:
          min: 10
          max: 1000
      - id: 23
        name: color_temp
        type: integer
        range:
          min: 0
          max: 1000
        mapping:
          - target_range:
              min: 2000
              max: 5000
      - 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
  - entity: switch
    translation_key: do_not_disturb
    category: config
    dps:
      - id: 34
        type: boolean
        name: switch
  - entity: switch
    name: Nightlight
    deprecated: light.nightlight  # 2026-03-02
    dps:
      - id: 53
        type: boolean
        name: switch
  - entity: light
    translation_key: nightlight
    dps:
      - id: 53
        type: boolean
        name: switch
  - entity: time
    name: Light timer
    translation_key: timer
    category: config
    dps:
      - id: 26
        type: integer
        optional: true
        name: second
        range:
          min: 0
          max: 86400
  - entity: time
    name: Fan timer
    translation_key: timer
    category: config
    dps:
      - id: 103
        type: integer
        optional: true
        name: second
        range:
          min: 0
          max: 86400
