name: Etersky aroma diffuser
products:
  - id: rvajlvjh4qoj1lkn
primary_entity:
  entity: fan
  translation_key: aroma_diffuser
  dps:
    - id: 2
      name: switch
      type: boolean
    - id: 3
      name: speed
      type: string
      mapping:
        - dps_val: large
          value: 100
        - dps_val: small
          value: 50
    - id: 11
      name: fault_code
      type: bitfield
secondary_entities:
  - entity: switch
    name: Power
    class: switch
    category: config
    dps:
      - id: 1
        type: boolean
        name: switch
  - entity: light
    translation_key: nightlight
    dps:
      - id: 7
        name: switch
        type: boolean
      - id: 8
        name: brightness
        type: integer
        optional: true
        range:
          min: 3
          max: 255
      - id: 9
        name: color_mode
        type: string
        mapping:
          - dps_val: white
            value: white
          - dps_val: colour
            value: hs
      - id: 10
        name: rgbhsv
        type: hex
        optional: true
        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
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 4
        name: option
        type: string
        mapping:
          - dps_val: cancel
            value: cancel
          - dps_val: "1"
            value: "1h"
          - dps_val: "3"
            value: "3h"
          - dps_val: "6"
            value: "6h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 5
        type: integer
        name: sensor
        unit: min
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 11
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
