name: Light
products:
  - id: 8ugheslg
    manufacturer: PowerAsia
    model: RGB 6 Inch recessed
entities:
  - entity: light
    dps:
      - id: 1
        type: boolean
        name: switch
      # Most of the non-switch dps are write-only on this device, so there will
      # be no feedback, but we can allow blind control as far as possible
      - id: 2
        name: color_mode
        type: string
        optional: true
        mapping:
          - dps_val: white
            value: color_temp
          - dps_val: colour
            value: hs
          - dps_val: scene
            value: Scene
          - dps_val: music
            value: Music
      - id: 3
        name: brightness
        type: integer
        optional: true
        range:
          min: 10
          max: 1000
      - id: 4
        name: color_temp
        type: integer
        optional: true
        range:
          min: 0
          max: 1000
        mapping:
          - target_range:
              min: 2700
              max: 6500
      - id: 11
        name: color_data_raw
        type: string
        optional: true
        # format unknown
      - id: 109
        type: string
        optional: true
        name: scene_data
      - id: 113
        type: string
        optional: true
        name: switch_gradient
      - id: 121
        type: string
        optional: true
        name: music_data
      - id: 123
        type: base64
        optional: true
        name: device_info
  - entity: light
    name: White
    category: config
    dps:
      - id: 107
        type: boolean
        name: switch
  - entity: light
    name: Color
    category: config
    dps:
      - id: 108
        type: boolean
        name: switch
  - entity: time
    translation_key: timer
    category: config
    dps:
      - id: 112
        type: integer
        name: second
        range:
          min: 0
          max: 86400
      - id: 140
        type: string
        optional: true
        name: timestamp
      - id: 141
        type: string
        optional: true
        name: local_timer
      - id: 142
        type: string
        optional: true
        name: timer_mgr
  - entity: switch
    name: Main switch
    category: config
    dps:
      - id: 119
        type: boolean
        name: switch
  - entity: select
    name: Control
    icon: "mdi:lightbulb-multiple"
    category: config
    dps:
      - id: 125
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: Independent
          - dps_val: "1"
            value: Grouped
  - entity: light
    translation_key: nightlight
    category: config
    dps:
      - id: 143
        type: boolean
        name: switch
