name: MoesHouse RGB socket
entities:
  - entity: switch
    class: outlet
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: light
    translation_key: nightlight
    dps:
      - id: 1
        name: switch
        type: boolean
      - id: 2
        name: color_mode
        type: string
        mapping:
          - dps_val: white
            value: white
          - dps_val: colour
            value: hs
          - dps_val: scene
            value: Scene
          - dps_val: scene_1
            value: Scene 1
          - dps_val: scene_2
            value: Scene 2
          - dps_val: scene_3
            value: Scene 3
          - dps_val: scene_4
            value: Scene 4
      - id: 3
        name: brightness
        type: integer
        range:
          min: 25
          max: 255
      - id: 4
        name: unknown_4
        type: integer
      - id: 5
        name: rgbhsv
        type: hex
        format:
          - name: r
            bytes: 1
          - name: g
            bytes: 1
          - name: b
            bytes: 1
          - name: h
            bytes: 2
            range:
              min: 0
              max: 360
          - name: s
            bytes: 1
          - name: v
            bytes: 1
      - id: 6
        name: scene_data
        type: hex
      - id: 7
        name: flash_scene_1
        type: hex
      - id: 8
        name: flash_scene_2
        type: hex
      - id: 9
        name: flash_scene_3
        type: hex
      - id: 10
        name: flash_scene_4
        type: hex
  - entity: number
    category: config
    class: duration
    translation_key: timer
    dps:
      - id: 102
        type: integer
        name: value
        optional: true
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: sensor
    category: diagnostic
    class: current
    dps:
      - id: 104
        name: sensor
        type: integer
        class: measurement
        unit: mA
  - entity: sensor
    category: diagnostic
    class: power
    dps:
      - id: 105
        name: sensor
        type: integer
        class: measurement
        unit: W
        mapping:
          - scale: 10
  - entity: sensor
    category: diagnostic
    class: voltage
    dps:
      - id: 106
        name: sensor
        type: integer
        class: measurement
        unit: V
        mapping:
          - scale: 10
