name: Aroma diffuser
products:
  - id: if1nolcm
    manufacturer: Dituo
    model: DT-T2190A
entities:
  - entity: switch
    dps:
      - id: 1
        type: boolean
        name: switch
  - entity: fan
    translation_key: aroma_diffuser
    dps:
      - id: 2
        type: boolean
        name: switch
      - id: 3
        type: string
        name: speed
        mapping:
          - dps_val: small
            value: 50
          - dps_val: large
            value: 100
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 5
        type: string
        name: option
        mapping:
          - dps_val: "on"
            value: cancel
          - dps_val: "1h"
            value: "1h"
          - dps_val: "3h"
            value: "3h"
          - dps_val: "6h"
            value: "6h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 6
        type: integer
        name: sensor
        unit: min
  - entity: light
    dps:
      - id: 7
        type: boolean
        name: switch
      - id: 8
        name: effect
        type: string
        mapping:
          - dps_val: colour
            value: "off"
          - dps_val: colourful1
            value: Colorful
          - dps_val: Night_light
            value: Night light
          - dps_val: scene
            value: Scene
      - id: 9
        name: brightness
        type: integer
        optional: true
        range:
          min: 1
          max: 100
      - id: 10
        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
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 12
        type: bitfield
        optional: true
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - dps_val: null
            value: false
          - value: true
      - id: 12
        type: bitfield
        optional: true
        name: fault_code
  - entity: select
    translation_key: scene
    category: config
    dps:
      - id: 101
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: night
            value: night
          - dps_val: read
            value: reading
          - dps_val: work
            value: working
          - dps_val: rest
            value: relax
          - dps_val: grassland
            value: Grassland
          - dps_val: colorful
            value: party
          - dps_val: Dazzle
            value: Dazzle
          - dps_val: gorgeous
            value: Gorgeous
