name: Robot vacuum
products:
  - id: tdxitkhbixikp8eh
    name: Lubluelu SL60D
primary_entity:
  entity: vacuum
  dps:
    - id: 1
      type: boolean
      name: activate
      optional: true
      mapping:
        - dps_val: false
          constraint: pause
          conditions:
            - dps_val: true
              value: false
            - dps_val: false
              value: false
              hidden: true
            - dps_val: null
              value: false
              hidden: true
        - dps_val: true
          constraint: pause
          conditions:
            - dps_val: false
              value: true
            - dps_val: true
              value: true
              hidden: true
            - dps_val: null
              value: true
              hidden: true
        - dps_val: null
          value: false
          hidden: true
    - id: 2
      type: boolean
      optional: true
      name: pause
      hidden: true
    - id: 4
      type: string
      name: command
      optional: true
      mapping:
        - dps_val: smart
          value: smart
        - dps_val: chargego
          value: return_to_base
        - dps_val: zone
          value: zone
        - dps_val: pose
          value: clean_spot
        - dps_val: part
          value: partial
        - dps_val: selectroom
          value: select_room
    - id: 5
      type: string
      name: status
      mapping:
        - dps_val: standby
          value: standby
        - dps_val: smart
          value: smart
        - dps_val: zone_clean
          value: zone
        - dps_val: part_clean
          value: partial
        - dps_val: cleaning
          value: cleaning
        - dps_val: paused
          value: paused
        - dps_val: goto_pos
          value: seeking_spot
        - dps_val: pos_arrived
          value: located spot
        - dps_val: pos_unarrive
          value: left_spot
        - dps_val: goto_charge
          value: returning
        - dps_val: charging
          value: charging
        - dps_val: charge_done
          value: charged
        - dps_val: sleep
          value: sleep
        - dps_val: select_room
          value: selecting_room
    - id: 9
      type: string
      name: fan_speed
      mapping:
        - dps_val: gentle
          value: Low
        - dps_val: normal
          value: Medium
        - dps_val: strong
          value: High
    - 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
      type: string
      optional: true
      name: path_data
    - id: 15
      type: string
      optional: true
      name: command_trans
    - id: 28
      type: bitfield
      name: error
    - id: 34
      type: string
      optional: true
      name: device_info
    - id: 35
      type: string
      optional: true
      name: voice_data

secondary_entities:
  - entity: switch
    name: Charge
    icon: "mdi:battery-charging"
    category: config
    dps:
      - id: 3
        type: boolean
        optional: true
        name: switch
  - entity: sensor
    name: Cleaning time
    icon: "mdi:progress-clock"
    class: duration
    category: diagnostic
    dps:
      - id: 6
        type: integer
        name: sensor
        unit: min
  - entity: sensor
    name: Cleaning area
    category: diagnostic
    icon: "mdi:floor-plan"
    dps:
      - id: 7
        type: integer
        name: sensor
        unit: m2
  - entity: sensor
    class: battery
    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: select
    name: Fetch request
    icon: "mdi:message-question"
    category: config
    dps:
      - id: 16
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: get_map
            value: Map
          - dps_val: get_path
            value: Path
          - dps_val: get_both
            value: Both
  - entity: sensor
    name: Side brush lifetime
    category: diagnostic
    class: duration
    dps:
      - id: 17
        type: integer
        name: sensor
        unit: h
  - entity: sensor
    name: Rolling brush lifetime
    category: diagnostic
    class: duration
    dps:
      - id: 19
        type: integer
        name: sensor
        unit: h
  - entity: sensor
    name: Filter lifetime
    category: diagnostic
    class: duration
    dps:
      - id: 21
        type: integer
        name: sensor
        unit: h
  - entity: sensor
    name: Duster cloth lifetime
    category: diagnostic
    class: duration
    dps:
      - id: 23
        type: integer
        name: sensor
        unit: min
        optional: true
  - entity: number
    name: Volume
    category: config
    icon: "mdi:volume-high"
    dps:
      - id: 26
        type: integer
        name: value
        optional: true
        unit: "%"
        range:
          min: 0
          max: 100
  - entity: sensor
    name: Total cleaning area
    icon: "mdi:texture-box"
    category: diagnostic
    dps:
      - id: 29
        type: integer
        name: sensor
        unit: m2
  - entity: sensor
    name: Total cleaning times
    icon: "mdi:counter"
    category: diagnostic
    dps:
      - id: 30
        type: integer
        name: sensor
  - entity: sensor
    name: Total cleaning time
    class: duration
    icon: "mdi:history"
    category: diagnostic
    dps:
      - id: 31
        type: integer
        name: sensor
        unit: min
  - entity: button
    name: Reset map
    icon: "mdi:map-marker-remove"
    category: config
    dps:
      - id: 13
        type: boolean
        name: button
        optional: true
  - entity: button
    name: Reset edge brush
    class: restart
    category: config
    dps:
      - id: 18
        type: boolean
        name: button
        optional: true
  - entity: button
    name: Reset roll brush
    class: restart
    category: config
    dps:
      - id: 20
        type: boolean
        name: button
        optional: true
  - entity: button
    name: Reset filter
    icon: "mdi:air-filter"
    category: config
    dps:
      - id: 22
        type: boolean
        name: button
        optional: true
  - entity: switch
    name: Do not disturb
    icon: "mdi:minus-circle"
    category: config
    dps:
      - id: 25
        type: boolean
        name: switch
      - id: 33
        type: string
        optional: true
        name: schedule
  - entity: switch
    name: Intermittent cleaning
    icon: "mdi:clock-star-four-points"
    category: config
    dps:
      - id: 27
        type: boolean
        name: switch
      - id: 32
        type: string
        optional: true
        name: schedule
  - entity: select
    translation_key: language
    category: config
    dps:
      - id: 36
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: chinese_simplified
            value: chinese
          - dps_val: chinese_traditional
            value: chinese_traditional
          - dps_val: english
            value: english
          - dps_val: german
            value: german
          - dps_val: french
            value: french
          - dps_val: russian
            value: russian
          - dps_val: spanish
            value: spanish
          - dps_val: korean
            value: korean
          - dps_val: latin
            value: latin
          - dps_val: portuguese
            value: portuguese
          - dps_val: japanese
            value: japanese
          - dps_val: italian
            value: italian
  - entity: number
    name: Dust empty frequency
    category: config
    icon: "mdi:delete"
    dps:
      - id: 37
        type: integer
        optional: true
        name: value
        range:
          min: 0
          max: 4
  - entity: button
    name: Empty dust
    category: config
    dps:
      - id: 38
        type: boolean
        optional: true
        name: button
  - entity: switch
    name: Custom room
    icon: "mdi:floor-plan"
    category: config
    dps:
      - id: 39
        type: boolean
        optional: true
        name: switch
  - entity: binary_sensor
    name: Mop installed
    icon: "mdi:water-plus"
    category: diagnostic
    dps:
      - id: 40
        type: string
        optional: true
        name: sensor
        mapping:
          - dps_val: installed
            value: true
          - value: false
  - entity: select
    name: Operation mode
    icon: "mdi:robot-vacuum"
    category: config
    dps:
      - id: 41
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: only_sweep
            value: Sweep
          - dps_val: only_mop
            value: Mop
          - dps_val: both_work
            value: Both
  - entity: select
    name: Carpet mode
    icon: "mdi:rug"
    category: config
    dps:
      - id: 44
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: adaptive
            value: Adapt
          - dps_val: evade
            value: Avoid
  - entity: switch
    name: Auto boost
    icon: "mdi:car-turbocharger"
    category: config
    dps:
      - id: 45
        type: boolean
        optional: true
        name: switch
