name: Cat litter box
products:
  - id: asx54fyagpyhxtej
    manufacturer: Elspet
    model: Spaceship
entities:
  - entity: switch
    name: Power
    category: config
    icon: "mdi:power"
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: sensor
    translation_key: status
    category: diagnostic
    class: enum
    dps:
      - id: 114
        type: string
        name: sensor
        mapping:
          - dps_val: power_off
            value: "off"
          - dps_val: standby
            value: standby
          - dps_val: caking
            value: caking
          - dps_val: cleaning
            value: cleaning
          - dps_val: sleeping
            value: sleep
          - dps_val: UV
            value: sterilizing
  - entity: button
    name: Manual clean
    category: config
    icon: "mdi:shimmer"
    dps:
      - id: 102
        type: boolean
        name: button
  - entity: number
    name: Clean wait time
    category: config
    translation_key: timer
    class: duration
    dps:
      - id: 103
        type: integer
        name: value
        unit: s
        range:
          min: 60
          max: 1800
  - entity: switch
    translation_key: uv_sterilization
    category: config
    dps:
      - id: 104
        type: boolean
        name: switch
  - entity: number
    name: UV time
    category: config
    class: duration
    icon: "mdi:timer"
    dps:
      - id: 105
        type: integer
        name: value
        unit: s
        range:
          min: 120
          max: 1800
  - entity: switch
    name: Auto deodorize
    category: config
    icon: "mdi:flower"
    dps:
      - id: 106
        type: boolean
        name: switch
  - entity: number
    name: Deodorize time
    category: config
    class: duration
    icon: "mdi:timer"
    dps:
      - id: 107
        type: integer
        name: value
        unit: s
        range:
          min: 120
          max: 1800
  - entity: light
    category: config
    dps:
      - id: 108
        type: boolean
        name: switch
  - entity: switch
    translation_key: sleep
    category: config
    dps:
      - id: 109
        type: boolean
        name: switch
  - entity: number
    name: Sleep start
    class: duration
    category: config
    icon: "mdi:timer"
    dps:
      - id: 110
        type: integer
        name: value
        unit: h
        range:
          min: 0
          max: 1440
        mapping:
          - scale: 60
  - entity: number
    name: Sleep end
    class: duration
    category: config
    icon: "mdi:timer"
    dps:
      - id: 111
        type: integer
        name: value
        unit: h
        range:
          min: 0
          max: 1440
        mapping:
          - scale: 60
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 118
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 118
        type: bitfield
        name: fault_code
      - id: 118
        type: bitfield
        name: description
        mapping:
          - dps_val: 0
            value: ok
          - dps_val: 1
            value: stuck
          - dps_val: 2
            value: dislocation
  - entity: sensor
    name: Clean count
    icon: "mdi:counter"
    category: diagnostic
    dps:
      - id: 112
        type: integer
        name: sensor
  - entity: sensor
    name: Average time today
    icon: "mdi:clock-time-three-outline"
    category: diagnostic
    class: duration
    dps:
      - id: 113
        type: integer
        name: sensor
        unit: s
        class: measurement
  - entity: binary_sensor
    name: UV sterilization
    icon: mdi:sun-wireless
    class: running
    category: diagnostic
    dps:
      - id: 115
        type: boolean
        name: sensor
  - entity: binary_sensor
    name: Deodorizing
    icon: mdi:spray
    class: running
    category: diagnostic
    dps:
      - id: 116
        type: boolean
        name: sensor
  - entity: sensor
    name: Litter
    icon: mdi:tray
    category: diagnostic
    class: enum
    dps:
      - id: 117
        type: string
        name: sensor
        mapping:
          - dps_val: full
            icon: "mdi:tray-full"
            value: Full
          - dps_val: half
            icon: "mdi:tray-minus"
            value: Half
          - dps_val: empty
            icon: "mdi:tray"
            value: Empty
  - entity: button
    name: Reset litter
    icon: "mdi:delete-empty"
    category: config
    dps:
      - id: 119
        type: boolean
        name: button
  - entity: button
    name: Full reset
    class: restart
    category: config
    dps:
      - id: 120
        type: boolean
        name: button
