name: Dimmer switch
products:
  - id: bf450789b46e8ff48f9n6r
    name: MoesGo dimmer switch
primary_entity:
  entity: light
  dps:
    - id: 1
      type: boolean
      name: switch
    - id: 2
      name: brightness
      type: integer
      range:
        min: 10
        max: 1000
secondary_entities:
  - entity: number
    name: Minimum brightness
    category: config
    icon: "mdi:brightness-percent"
    dps:
      - id: 3
        type: integer
        name: value
        unit: "%"
        range:
          min: 10
          max: 1000
        mapping:
          - scale: 10
  - entity: select
    name: Light type
    icon: "mdi:lightbulb-question"
    category: config
    dps:
      - id: 4
        type: string
        name: option
        mapping:
          - dps_val: led
            value: LED
          - dps_val: incandescent
            value: Incandescent
          - dps_val: halogen
            value: Halogen
  - entity: number
    translation_key: timer
    category: config
    dps:
      - id: 6
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: select
    translation_key: initial_state
    category: config
    dps:
      - id: 14
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "off"
            value: "off"
          - dps_val: "on"
            value: "on"
          - dps_val: memory
            value: memory
  - entity: light
    translation_key: backlight
    category: config
    dps:
      - id: 26
        type: boolean
        name: switch
