name: Lefant M213 vacuum
primary_entity:
  entity: vacuum
  dps:
    - id: 1
      type: boolean
      name: power
    - id: 2
      type: boolean
      name: activate
    - id: 3
      type: string
      name: command
      mapping:
        - dps_val: standby
          value: stop
        - dps_val: smart
          value: smart
        - dps_val: chargego
          value: return_to_base
        - dps_val: random
          value: random
        - dps_val: wall_follow
          value: wall_follow
        - dps_val: spiral
          value: clean_spot
    - id: 4
      type: string
      name: direction_control
      optional: true
      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: 5
      type: string
      name: status
      mapping:
        - dps_val: "0"
          value: paused
        - dps_val: "1"
          value: smart
        - dps_val: "2"
          value: wall follow
        - dps_val: "3"
          value: spiral
        - dps_val: "4"
          value: returning
        - dps_val: "5"
          value: charging
        - dps_val: "6"
          value: random
        - dps_val: "7"
          value: standby
    - id: 13
      type: boolean
      name: locate
      optional: true
    - 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: 32
          value: garbage_box
        - dps_val: 64
          value: land_check
        - dps_val: 128
          value: collision
        - dps_val: 512
          value: low_battery
        - dps_val: 1024
          value: stuck
        - dps_val: 262144
          value: switched_off
    - id: 19
      type: string
      name: map_parameter
      optional: true
    - id: 101
      type: string
      name: fan_speed
      mapping:
        - dps_val: low
          value: Low
        - dps_val: nar
          value: Medium
        - dps_val: high
          value: High
    - id: 102
      type: integer
      optional: true
      name: chassis_temperature
    - id: 103
      type: integer
      optional: true
      name: heading
    - id: 104
      type: integer
      optional: true
      name: iic_error_count
    - id: 105
      type: string
      name: wheel_status
      optional: true
    - id: 106
      type: string
      name: dock_info
      optional: true
    - id: 107
      type: string
      name: robot_status
      optional: true
    - id: 108
      type: string
      name: robot_info
      optional: true
secondary_entities:
  - entity: sensor
    class: battery
    dps:
      - id: 6
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: sensor
    name: Clean area
    category: diagnostic
    icon: "mdi:floor-plan"
    dps:
      - id: 16
        type: integer
        name: sensor
        optional: true
        unit: m2
  - entity: sensor
    name: Clean time
    category: diagnostic
    class: duration
    icon: "mdi:clock-outline"
    dps:
      - id: 17
        type: integer
        name: sensor
        unit: min
        optional: true
