name: Pet water fountain
products:
  - id: hpa87ady0hndivqn
    manufacturer: Sobralik
    model: FW-W01
entities:
  - entity: switch
    icon: "mdi:water-pump"
    dps:
      - id: 1
        type: boolean
        name: switch
  - entity: binary_sensor
    translation_key: tank_empty
    dps:
      - id: 23
        name: sensor
        type: bitfield
        mapping:
          - dps_val: 1
            value: true
          - value: false
  - entity: binary_sensor
    name: Replace filter
    class: problem
    dps:
      - id: 23
        name: sensor
        type: bitfield
        mapping:
          - dps_val: 2
            value: true
          - value: false
  - entity: binary_sensor
    name: Cleaning required
    class: problem
    dps:
      - id: 23
        name: sensor
        type: bitfield
        mapping:
          - dps_val: 4
            value: true
          - value: false

  - entity: button
    translation_key: filter_reset
    category: config
    dps:
      - id: 5
        type: boolean
        name: button
  - entity: button
    name: Clean reset
    icon: "mdi:pump"
    category: config
    dps:
      - id: 6
        type: boolean
        name: button
  - entity: sensor
    translation_key: filter_life
    class: duration
    category: diagnostic
    dps:
      - id: 3
        type: integer
        name: sensor
        unit: d
  - entity: sensor
    name: Clean left
    icon: "mdi:pump"
    class: duration
    category: diagnostic
    dps:
      - id: 4
        type: integer
        name: sensor
        precision: 0
        range:
          min: 0
          max: 31
        unit: d
  - entity: number
    name: Filter life
    icon: "mdi:air-filter"
    category: config
    dps:
      - id: 7
        type: integer
        name: value
        precision: 0
        range:
          min: 0
          max: 90
        unit: d
  - entity: number
    name: Clean life
    icon: "mdi:pump"
    category: config
    dps:
      - id: 8
        type: integer
        name: value
        precision: 0
        range:
          min: 0
          max: 31
        unit: d
  - entity: sensor
    translation_key: water_level
    class: enum
    category: diagnostic
    dps:
      - id: 9
        name: sensor
        type: string
        mapping:
          - dps_val: level_1
            value: low
          - dps_val: level_2
            value: high
