name: Mellerware vacuum
products:
  - id: sayafukjeqp9kupy
    name: Mellerware City Move
primary_entity:
  entity: vacuum
  dps:
    - id: 1
      type: boolean
      name: power
    - id: 17
      type: bitfield
      name: error
      optional: true
      mapping:
        - dps_val: 1
          value: cliff
        - dps_val: 2
          value: imp
        - dps_val: 4
          value: whl
        - dps_val: 8
          value: brush
        - dps_val: 16
          value: fan
        - dps_val: 32
          value: roller_brush
        - dps_val: 64
          value: low_power
        - dps_val: 128
          value: give_up
        - dps_val: 256
          value: no_dust
        - dps_val: 512
          value: "none"
    - id: 101
      type: string
      name: status
      optional: true
      mapping:
        - dps_val: SLEEP
          value: standby
        - dps_val: CHARG_COMP
          value: charged
        - dps_val: null
          value: standby
        - dps_val: HALTING
          value: paused
        - dps_val: CLEANING
          value: cleaning
        - dps_val: CLEAN_COMP
          value: cleaning_complete
        - dps_val: FIND_STA
          value: returning
        - dps_val: CHARGING_STA
          value: charging
        - dps_val: CHARGING_DC
          value: charging
    - id: 102
      type: string
      name: command
      optional: true
      mapping:
        - dps_val: clean_auto
          value: auto
        - dps_val: clean_random
          value: random
        - dps_val: clean_wall
          value: wall_follow
        - dps_val: clean_spot
          value: clean_spot
        - dps_val: clean_sroom
          value: clean_room
        - dps_val: find_sta
          value: return_to_base
    - id: 104
      type: string
      name: fan_speed
      optional: true
      force: true
      mapping:
        - dps_val: FANHALTING
          value: Low
        - dps_val: FANNORAM
          value: Medium
        - dps_val: FANMAX
          value: High
    - id: 105
      type: string
      name: direction_control
      optional: true
      mapping:
        - dps_val: MoveForward
          value: forward
        - dps_val: MoveBackward
          value: reverse
        - dps_val: MoveLeft
          value: left
        - dps_val: MoveRight
          value: right
        - dps_val: stop
          value: stop
    - id: 112
      type: string
      name: activate
      optional: true
      mapping:
        - dps_val: "0"
          value: false
        - dps_val: "1"
          value: true
    - id: 116
      type: boolean
      name: locate
      optional: true
    - id: 117
      type: string
      name: program
      optional: true
    - id: 118
      type: integer
      name: model
      optional: true
    - id: 119
      type: integer
      name: data_sample
      optional: true
    - id: 117
      type: string
      name: time
      optional: true
secondary_entities:
  - entity: sensor
    name: Clean area
    category: diagnostic
    icon: "mdi:floor-plan"
    dps:
      - id: 14
        type: integer
        name: sensor
        unit: m2
        optional: true
        mapping:
          - scale: 10
  - entity: sensor
    name: Clean time
    class: duration
    category: diagnostic
    icon: "mdi:clock-outline"
    dps:
      - id: 107
        type: integer
        name: sensor
        unit: min
        optional: true
  - entity: sensor
    class: battery
    dps:
      - id: 108
        type: integer
        name: sensor
        unit: "%"
        class: measurement
        optional: true
  - entity: sensor
    name: Brush remaining
    category: diagnostic
    icon: "mdi:arrow-expand-all"
    dps:
      - id: 109
        type: integer
        name: sensor
        unit: "%"
        force: true
        optional: true
  - entity: sensor
    name: Roller brush remaining
    category: diagnostic
    icon: "mdi:circle"
    dps:
      - id: 110
        type: integer
        name: sensor
        unit: "%"
        force: true
        optional: true
  - entity: sensor
    name: HEPA filter remaining
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 111
        type: integer
        name: sensor
        unit: "%"
        force: true
        optional: true
  - entity: button
    name: Reset brush
    class: restart
    category: config
    dps:
      - id: 113
        type: boolean
        name: button
        optional: true
  - entity: button
    name: Reset roller brush
    class: restart
    category: config
    dps:
      - id: 114
        type: boolean
        name: button
        optional: true
  - entity: button
    name: Reset HEPA filter
    category: config
    class: restart
    dps:
      - id: 115
        type: boolean
        name: button
        optional: true
