name: Pet feeder
products:
  - id: e1zs835joz1lc85q
    name: Petlibro PLAF203
primary_entity:
  entity: sensor
  translation_key: status
  icon: "mdi:paw"
  dps:
    - id: 233
      type: string
      name: sensor
      optional: true
    - id: 231
      type: hex
      name: schedule
    - id: 236
      type: bitfield
      name: fault_code
      optional: true
    - id: 237
      type: string
      name: planned_feed_report
      optional: true
    - id: 247
      type: string
      name: manual_feed_report
      optional: true
secondary_entities:
  - entity: light
    translation_key: indicator
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: switch
    name: Flip
    icon: "mdi:flip-horizontal"
    category: config
    dps:
      - id: 103
        type: boolean
        name: switch
  - entity: select
    name: Nightvision
    icon: "mdi:weather-night"
    category: config
    dps:
      - id: 108
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: Auto
          - dps_val: "1"
            value: "Off"
          - dps_val: "2"
            value: "On"
  - entity: button
    name: Memory card format
    icon: "mdi:micro-sd"
    category: config
    dps:
      - id: 111
        type: boolean
        name: button
        optional: true
      - id: 110
        type: integer
        name: status
      - id: 109
        type: string
        name: capacity
      - id: 117
        type: integer
        name: format_state
  - entity: camera
    name: Camera
    dps:
      - id: 105
        type: boolean
        name: switch
        mapping:
          - dps_val: false
            value: true
          - dps_val: true
            value: false
      - id: 113
        type: boolean
        name: motion_enable
        optional: true
      - id: 115
        type: base64
        name: snapshot
        optional: true
        sensitive: true
  - entity: switch
    name: Motion notification
    icon: "mdi:motion-sensor"
    category: config
    dps:
      - id: 134
        type: boolean
        name: switch
  - entity: select
    name: Motion sensitivity
    icon: "mdi:motion-sensor"
    category: config
    dps:
      - id: 106
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: Low
          - dps_val: "1"
            value: Medium
          - dps_val: "2"
            value: High
  - entity: switch
    name: Sound notification
    icon: "mdi:ear-hearing"
    category: config
    dps:
      - id: 139
        type: boolean
        name: switch
  - entity: select
    name: Sound sensitivity
    icon: "mdi:ear-hearing"
    category: config
    dps:
      - id: 140
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "0"
            value: Low
          - dps_val: "1"
            value: High
  - entity: switch
    name: Record
    icon: "mdi:record-rec"
    dps:
      - id: 150
        type: boolean
        name: switch
        optional: true
  - entity: select
    name: Recording mode
    icon: "mdi:video"
    category: config
    dps:
      - id: 151
        type: string
        name: option
        mapping:
          - dps_val: "1"
            value: Event
          - dps_val: "2"
            value: Continuous
  - entity: number
    name: Manual feed
    category: config
    icon: "mdi:food-drumstick"
    dps:
      - id: 232
        type: integer
        name: value
        optional: true
        range:
          min: 0
          max: 50
        persist: false
        mapping:
          - dps_val: null
            value: 0
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 235
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: binary_sensor
    name: Food empty
    class: problem
    category: diagnostic
    dps:
      - id: 236
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: 1
            value: true
          - value: false
  - entity: binary_sensor
    name: Blocked
    class: problem
    category: diagnostic
    dps:
      - id: 236
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: 2
            value: true
          - value: false
  - entity: binary_sensor
    class: battery
    category: diagnostic
    dps:
      - id: 236
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: 8
            value: true
          - value: false
  - entity: number
    name: Voice playback times
    category: config
    icon: "mdi:account-voice"
    dps:
      - id: 238
        type: integer
        name: value
        range:
          min: 0
          max: 10
      - id: 239
        type: string
        name: operation
      - id: 240
        type: string
        name: voice
      - id: 242
        type: string
        name: status
      - id: 248
        type: string
        name: filename
        optional: true
  - entity: sensor
    name: Food level
    category: diagnostic
    dps:
      - id: 241
        type: string
        name: sensor
  - entity: switch
    name: Log
    icon: "mdi:text-box-multiple-outline"
    category: config
    dps:
      - id: 244
        type: boolean
        name: switch
