name: Robot vacuum
products:
  - id: yn442adgwn5ffqmz
    name: Lefant N3
  - id: jtna6ihybmr0mxg8
    name: Lefant N3
primary_entity:
  entity: vacuum
  dps:
    - id: 1
      name: power
      type: boolean
      optional: true
    - id: 2
      name: activate
      type: boolean
      optional: true
      mapping:
        - dps_val: true
          value: false
        - dps_val: false
          value: true
    - id: 3
      name: switch_charge
      type: boolean
      optional: true
      hidden: true
    - id: 4
      name: command
      type: string
      optional: true
      mapping:
        - dps_val: smart
          constraint: power
          conditions:
            - dps_val: true
              value: smart
        - dps_val: chargego
          constraint: switch_charge
          conditions:
            - dps_val: true
              value: return_to_base
        - dps_val: zone
          constraint: power
          conditions:
            - dps_val: true
              value: clean_zone
        - dps_val: pose
          constraint: power
          conditions:
            - dps_val: true
              value: clean_spot
        - dps_val: part
          constraint: power
          conditions:
            - dps_val: true
              value: clean_partial
        - dps_val: fastmapping
          value: map
        - dps_val: CleanModeSectorbased
          value: clean_sector
    - id: 5
      name: status
      type: string
      mapping:
        - dps_val: standby
          value: standby
        - dps_val: smart
          value: cleaning
        - dps_val: zone_clean
          value: cleaning
        - dps_val: part_clean
          value: cleaning
        - dps_val: cleaning
          value: cleaning
        - dps_val: paused
          value: paused
        - dps_val: goto_pos
          value: positioning
        - dps_val: pos_arrived
          value: at_position
        - dps_val: pos_unarrive
          value: cannot_find_position
        - dps_val: goto_charge
          value: returning
        - dps_val: charging
          value: charging
        - dps_val: charge_done
          value: charged
        - dps_val: sleep
          value: sleep
        - dps_val: relocating
          value: positioning
        - dps_val: relocating_recharge
          value: returning
        - dps_val: recharing_paused
          value: paused
        - dps_val: fastmaping
          value: mapping
        - dps_val: fastmaping_paused
          value: paused
    - id: 9
      name: fan_speed
      type: string
      mapping:
        - dps_val: closed
          value: "off"
        - dps_val: gentle
          value: low
        - dps_val: normal
          value: medium
        - dps_val: strong
          value: high
        - dps_val: superstrong
          value: turbo
    - id: 11
      type: boolean
      name: locate
      optional: true
    - id: 12
      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: 14
      name: path_data
      type: string
      optional: true
    - id: 15
      name: command_trans
      type: string
      optional: true
    - id: 16
      name: request
      type: string
      optional: true
    - id: 28
      type: bitfield
      name: error
    - id: 32
      type: string
      optional: true
      name: schedule
    - id: 33
      type: string
      optional: true
      name: do_not_disturb_schedule
    - id: 101
      type: string
      optional: true
      name: forbidden_zone
    - id: 102
      type: string
      optional: true
      name: clean_zone
    - id: 103
      type: string
      optional: true
      name: pos_clean
    - id: 104
      type: string
      optional: true
      name: all_zone
    - id: 105
      type: string
      optional: true
      name: map_zoom_android
    - id: 106
      type: string
      optional: true
      name: map_zoom_ios
    - id: 107
      type: string
      optional: true
      name: dev_log_show
    - id: 108
      type: boolean
      optional: true
      name: returning_from_zone
    - id: 109
      type: boolean
      optional: true
      name: returning_from_spot
    - id: 110
      type: string
      optional: true
      name: device_info
    - id: 111
      type: string
      optional: true
      name: robot_log
    - id: 112
      type: string
      optional: true
      name: map_save
    - id: 120
      type: string
      optional: true
      name: voice_check
    - id: 121
      type: string
      optional: true
      name: robot_reboot
    - id: 123
      type: string
      optional: true
      name: do_not_disturb_settings
    - id: 124
      type: boolean
      optional: true
      name: scheduled_clean
    - id: 126
      type: boolean
      optional: true
      name: map_saved
secondary_entities:
  - entity: button
    name: Start
    icon: "mdi:play"
    category: config
    dps:
      - id: 1
        type: boolean
        name: button
        optional: true
  - entity: button
    name: Pause
    icon: "mdi:pause"
    category: config
    dps:
      - id: 2
        type: boolean
        optional: true
        name: button
  - entity: button
    name: Dock
    category: config
    dps:
      - id: 3
        type: boolean
        optional: true
        name: button
  - entity: sensor
    name: Clean time
    class: duration
    category: diagnostic
    dps:
      - id: 6
        type: integer
        optional: true
        name: sensor
        unit: min
        class: measurement
  - entity: sensor
    name: Cleaned area
    category: diagnostic
    icon: "mdi:floor-plan"
    dps:
      - id: 7
        type: integer
        optional: true
        name: sensor
        unit: m2
        class: measurement
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 8
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: select
    translation_key: mopping
    category: config
    dps:
      - id: 10
        type: string
        name: option
        mapping:
          - dps_val: closed
            value: "off"
          - dps_val: low
            value: low
          - dps_val: middle
            value: medium
          - dps_val: high
            value: high
  - entity: button
    name: Map reset
    class: restart
    category: config
    dps:
      - id: 13
        type: boolean
        name: button
        optional: true
  - entity: switch
    name: Intermittent cleaning
    icon: "mdi:clock-outline"
    category: config
    dps:
      - id: 27
        type: boolean
        name: switch
  - entity: switch
    name: Carpet booster
    icon: "mdi:rug"
    category: config
    dps:
      - id: 45
        type: boolean
        name: switch
  - entity: switch
    name: Save maps
    category: config
    dps:
      - id: 122
        type: boolean
        name: switch
  - entity: binary_sensor
    class: battery_charging
    category: diagnostic
    dps:
      - id: 125
        type: boolean
        name: sensor
