name: Pet feeder
products:
  - id: hbiwalfrzqfzv2cq
    manufacturer: Rojeco
    model: PTM-001
entities:
  - entity: button
    icon: "mdi:food-drumstick"
    name: Quick feed
    dps:
      - id: 2
        type: boolean
        name: button
        optional: true
  - entity: sensor
    icon: "mdi:paw"
    name: Last amount
    category: diagnostic
    dps:
      - id: 14
        name: sensor
        type: integer
        unit: portions
        optional: true
  - entity: sensor
    category: diagnostic
    name: Feed state
    icon: "mdi:valve"
    class: enum
    dps:
      - id: 4
        name: sensor
        type: string
        mapping:
          - dps_val: standby
            value: Standby
          - dps_val: feeding
            value: Feeding
          - dps_val: done
            value: Done
  - entity: number
    translation_key: manual_feed
    category: config
    dps:
      - id: 3
        type: integer
        name: value
        unit: portions
        range:
          min: 1
          max: 60
  - entity: switch
    name: Slow feed
    category: config
    icon: "mdi:speedometer-slow"
    dps:
      - id: 23
        type: boolean
        name: switch
  - entity: light
    translation_key: indicator
    category: config
    dps:
      - id: 17
        type: boolean
        name: switch
  - entity: binary_sensor
    name: Empty food
    icon: "mdi:seed-off-outline"
    class: problem
    category: diagnostic
    dps:
      - id: 13
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 2
            value: true
          - value: false
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 13
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - dps_val: 2
            value: false
          - value: true
      - id: 13
        type: bitfield
        name: fault_code
  - entity: sensor
    name: Battery level
    class: battery
    category: diagnostic
    dps:
      - id: 10
        type: integer
        name: sensor
        unit: "%"
        class: measurement
        optional: true
