name: Fan with light
products:
  - id: kbhfiv4zxa3qkcsf
    manufacturer: Milano
    model: Ceiling Fan

entities:
  - entity: fan
    translation_only_key: fan_with_presets
    dps:
      - id: 1
        type: boolean
        name: switch

      - id: 2
        type: string
        name: preset_mode
        mapping:
          - dps_val: Nature
            value: nature
          - dps_val: Normal
            value: normal

      - id: 3
        name: speed
        type: integer
        optional: true
        mapping:
          - dps_val: 16
            value: 16
          - dps_val: 32
            value: 32
          - dps_val: 48
            value: 48
          - dps_val: 64
            value: 64
          - dps_val: 80
            value: 80
          - dps_val: 96
            value: 96

      - id: 8
        name: direction
        type: string
        optional: true
        mapping:
          - dps_val: forward
            value: forward
          - dps_val: reverse
            value: reverse

  - entity: light
    dps:
      - id: 15
        type: boolean
        name: switch
      - id: 16
        type: integer
        name: brightness
        range:
          min: 10
          max: 1000
        mapping:
          - step: 10

  - entity: select
    translation_key: timer
    dps:
      - id: 22
        name: option
        type: string
        mapping:
          - dps_val: cancel
            value: cancel
          - dps_val: "1h"
            value: "1h"
          - dps_val: "2h"
            value: "2h"
          - dps_val: "3h"
            value: "3h"
          - dps_val: "4h"
            value: "4h"
          - dps_val: "5h"
            value: "5h"
          - dps_val: "6h"
            value: "6h"
          - dps_val: "7h"
            value: "7h"
          - dps_val: "8h"
            value: "8h"
          - dps_val: "9h"
            value: "9h"

  - entity: sensor
    name: timer_remaining
    category: diagnostic
    dps:
      - id: 23
        name: sensor
        type: integer
        unit: min
