name: Pet feeder
products:
  - id: 0l6zinzwpitdndi8
    manufacturer: Balimo
    model: 4L automatic feeder
#  - id: UNKNOWN
#    model: TY-AF3W
entities:
  - entity: number
    name: Servings
    icon: "mdi:chicken-drumstick"
    dps:
      - id: 101
        type: integer
        optional: true
        name: value
        unit: portions
        range:
          min: 1
          max: 10
      - id: 104
        type: string
        optional: true
        name: schedule
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 102
        type: bitfield
        optional: true
        name: sensor
        mapping:
          - dps_val: 0
            value: true
            constraint: feeding_fault
            conditions:
              - dps_val: 0
                value: false
              - dps_val: null
                value: false
          - dps_val: null
            value: true
            constraint: feeding_fault
            conditions:
              - dps_val: 0
                value: false
              - dps_val: null
                value: false
          - value: true
      - id: 102
        type: bitfield
        optional: true
        name: fault_code
      - id: 103
        type: bitfield
        optional: true
        name: feeding_fault
  - entity: sensor
    name: Last feed
    category: diagnostic
    dps:
      - id: 105
        type: integer
        name: sensor
        unit: portions
        class: measurement
