name: Kyvol E30 vacuum
primary_entity:
  entity: vacuum
  dps:
    - id: 1
      type: boolean
      name: power
    - id: 2
      type: boolean
      name: activate
    - id: 3
      type: string
      name: status
      mapping:
        - dps_val: standby
          value: standby
        - dps_val: random
          value: random
        - dps_val: smart
          value: smart
        - dps_val: wall_follow
          value: wall_follow
        - dps_val: mop
          value: mop
        - dps_val: spiral
          value: clean_spot
        - dps_val: left_spiral
          value: left_spiral
        - dps_val: right_spiral
          value: right_spiral
        - dps_val: bow
          value: bow
        - dps_val: left_bow
          value: left_bow
        - dps_val: right_bow
          value: right_bow
        - dps_val: partial_bow
          value: partial_bow
        - dps_val: chargego
          value: return_to_base
        - dps_val: single
          value: single
        - dps_val: zone
          value: zone
        - dps_val: pose
          value: pose
        - dps_val: point
          value: point
        - dps_val: part
          value: part
        - dps_val: pick_zone
          value: pick_zone
    - id: 4
      type: string
      name: direction_control
      mapping:
        - dps_val: forward
          value: forward
        - dps_val: backward
          value: reverse
        - dps_val: turn_left
          value: left
        - dps_val: turn_right
          value: right
        - dps_val: stop
          value: stop
    - id: 13
      type: boolean
      name: locate
    - id: 14
      type: string
      name: fan_speed
      mapping:
        - dps_val: "0"
          value: strong
        - dps_val: "1"
          value: normal
        - dps_val: "2"
          value: quiet
        - dps_val: "3"
          value: gentle
        - dps_val: "4"
          value: closed
    - id: 15
      type: string
      name: clean_record
      optional: true
    - id: 18
      type: bitfield
      name: error
      mapping:
        - dps_val: 1
          value: edge_sweep
        - dps_val: 2
          value: middle_sweep
        - dps_val: 4
          value: left_wheel
        - dps_val: 8
          value: right_wheel
        - dps_val: 16
          value: garbage_box
        - dps_val: 32
          value: land_check
        - dps_val: 64
          value: collision
    - id: 101
      type: string
      name: water_status
    - id: 102
      type: string
      name: model
    - id: 104
      type: string
      name: mode
    - id: 107
      type: integer
      name: carpet_adaptive
secondary_entities:
  - entity: sensor
    class: battery
    dps:
      - id: 6
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: sensor
    name: Clean time
    category: diagnostic
    class: duration
    icon: "mdi:clock-outline"
    dps:
      - id: 17
        type: integer
        name: sensor
        unit: min
  - entity: sensor
    name: Clean area
    category: diagnostic
    icon: "mdi:floor-plan"
    dps:
      - id: 16
        type: integer
        name: sensor
        optional: true
        unit: m2
        mapping:
          - scale: 10
  - entity: button
    name: Edge brush reset
    class: restart
    category: config
    dps:
      - id: 10
        type: boolean
        name: button
  - entity: button
    name: Roll brush reset
    class: restart
    category: config
    dps:
      - id: 11
        type: boolean
        name: button
  - entity: button
    translation_key: filter_reset
    category: config
    dps:
      - id: 12
        type: boolean
        name: button
  - entity: sensor
    name: Edge brush
    category: diagnostic
    icon: "mdi:arrow-expand-all"
    dps:
      - id: 7
        type: integer
        name: sensor
        unit: "%"
  - entity: sensor
    name: Roll brush
    category: diagnostic
    icon: "mdi:circle"
    dps:
      - id: 8
        type: integer
        name: sensor
        unit: "%"
  - entity: sensor
    name: Filter
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 9
        type: integer
        name: sensor
        unit: "%"
  - entity: sensor
    translation_key: status
    category: diagnostic
    icon: "mdi:robot-vacuum"
    dps:
      - id: 5
        type: string
        name: sensor
