name: Aroma diffuser
products:
  - id: 7x87ndiyat1sv6os
    manufacturer: Asakuki
    model: Cube WiFi
entities:
  - entity: fan
    translation_key: aroma_diffuser
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 103
        type: string
        name: speed
        mapping:
          - dps_val: small
            value: 50
          - dps_val: big
            value: 100
          - dps_val: "off"
            value: 0
            hidden: true
  - entity: light
    category: config
    dps:
      - id: 11
        type: boolean
        name: switch
      - id: 108
        type: hex
        name: rgbhsv
        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
            range:
              min: 0
              max: 255
          - name: v
            bytes: 1
            range:
              min: 0
              max: 255
      - id: 109
        type: string
        name: effect
        mapping:
          - dps_val: white
            value: white
            hidden: true
          - dps_val: colour
            value: "off"
          - dps_val: scene
            value: Scene
          - dps_val: scene1
            value: Scene 1
          - dps_val: scene2
            value: Scene 2
          - dps_val: scene3
            value: Scene 3
          - dps_val: scene4
            value: Scene 4
      - id: 111
        type: integer
        name: brightness
        range:
          min: 0
          max: 255
  - entity: select
    name: Mood lighting
    icon: "mdi:candelabra-fire"
    category: config
    dps:
      - id: 110
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "1"
            value: "Cycle"
          - dps_val: "2"
            value: "Fixed"
          - dps_val: "3"
            value: "Nightlight"
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 12
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: 0
            value: false
          - dps_val: null
            value: false
          - value: true
      - id: 12
        type: bitfield
        name: fault_code
        optional: true
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 13
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "0"
            value: cancel
          - dps_val: "1"
            value: "1h"
          - dps_val: "2"
            value: "3h"
          - dps_val: "3"
            value: "6h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 14
        type: integer
        name: sensor
        unit: min
        optional: true
