name: RGBCW light
products:
  - id: sjaun9de
    name: Peteme SIG_DL_RGBCW recessed lighting
primary_entity:
  entity: light
  dps:
    - id: 1
      type: boolean
      name: switch
    - 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
        - dps_val: null
          value: color_temp
    - id: 3
      name: brightness
      type: integer
      optional: true
      range:
        min: 10
        max: 1000
      mapping:
        - scale: 3.92
    - id: 4
      name: color_temp
      type: integer
      optional: true
      range:
        min: 0
        max: 1000
      mapping:
        - target_range:
            min: 2700
            max: 6500
    - id: 5
      name: rgbhsv
      type: hex
      optional: true
      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
    - id: 6
      name: scene_data
      type: hex
      optional: true
    - id: 8
      name: music_data
      type: hex
      optional: true
