name: Video pet feeder
products:
  - id: 8zrzjldq07tlxnlv
    manufacturer: Mypin
    model: 6L
entities:
  - entity: camera
    dps:
      - id: 113
        type: boolean
        optional: true
        name: motion_enable
        mapping:
          - dps_val: null
            value: false
            hidden: true
      - id: 150
        type: boolean
        optional: true
        name: record
        mapping:
          - dps_val: null
            value: false
            hidden: true
  - entity: light
    translation_key: indicator
    category: config
    dps:
      - id: 101
        type: boolean
        optional: true
        name: switch
  - entity: switch
    name: Watermark
    icon: "mdi:watermark"
    category: config
    dps:
      - id: 104
        type: boolean
        optional: true
        name: switch
  - entity: select
    name: Night vision
    icon: "mdi:weather-night"
    category: config
    dps:
      - id: 108
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: "0"
            value: Auto
          - dps_val: "1"
            value: "Off"
          - dps_val: "2"
            value: "On"
  - entity: sensor
    name: SD status
    translation_key: status
    class: enum
    icon: "mdi:micro-sd"
    category: diagnostic
    dps:
      - id: 110
        type: integer
        optional: true
        name: sensor
        mapping:
          - dps_val: 1
            value: normal
          - dps_val: 2
            value: fault
          - dps_val: 3
            value: full
          - dps_val: 4
            value: formatting
          - dps_val: 5
            value: missing
          - dps_val: null
            value: normal
      - id: 109
        type: string
        optional: true
        name: capacity
  - entity: button
    name: SD format
    icon: "mdi:micro-sd"
    category: config
    dps:
      - id: 111
        type: boolean
        name: button
        optional: true
      - id: 117
        type: integer
        name: state
        optional: true
        persist: false
        mapping:
          - dps_val: 2000
            value: Formatting
          - dps_val: 2001
            value: Format failed
          - dps_val: 2002
            value: Card missing
          - dps_val: 2003
            value: Card error
          - dps_val: null
            value: Formatted
          - dps_val: 0
            value: Formatted
  - entity: select
    name: Recording mode
    icon: "mdi:vhs"
    category: config
    dps:
      - id: 151
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: "1"
            value: Event
          - dps_val: "2"
            value: Continuous
  - entity: button
    class: restart
    dps:
      - id: 162
        type: boolean
        optional: true
        name: button
  - entity: sensor
    name: Food weight
    class: weight
    category: diagnostic
    dps:
      - id: 232
        type: integer
        optional: true
        name: sensor
        unit: g
        range:
          min: 1
          max: 100
        mapping:
          - scale: 10
          - dps_val: null
            value: 0
  - entity: number
    name: Control code
    category: config
    icon: "mdi:function-variant"
    dps:
      - id: 233
        type: integer
        optional: true
        name: value
        range:
          min: 0
          max: 2147483646
      - id: 234
        type: integer
        optional: true
        name: return_code
      - id: 236
        type: integer
        optional: true
        name: history
  - entity: number
    name: Auto ration
    category: config
    icon: "mdi:food-drumstick"
    dps:
      - id: 235
        type: integer
        optional: true
        name: value
        range:
          min: 0
          max: 255
      - id: 237
        type: string
        optional: true
        name: schedule
      - id: 247
        type: string
        optional: true
        name: backup_log
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 238
        type: string
        optional: true
        name: sensor
        unit: "%"
        mapping:
          - dps_val: high
            value: 80
          - dps_val: low
            value: 20
          - dps_val: "no"
            value: 0
  - entity: sensor
    name: Food level
    class: enum
    icon: "mdi:train-car-centerbeam-full"
    category: diagnostic
    dps:
      - id: 239
        type: string
        optional: true
        name: sensor
        mapping:
          - dps_val: full
            value: Full
          - dps_val: less
            value: Low
          - dps_val: lack
            value: Empty
  - entity: binary_sensor
    name: Blocked
    class: problem
    category: diagnostic
    dps:
      - id: 240
        type: boolean
        optional: true
        name: sensor
  - entity: binary_sensor
    name: Jammed
    class: problem
    category: diagnostic
    dps:
      - id: 241
        type: boolean
        optional: true
        name: sensor
  - entity: event
    name: Voice recording
    icon: "mdi:account-voice"
    dps:
      - id: 242
        type: string
        name: event
        optional: true
        mapping:
          - dps_val: "0"
            value: stopped
          - dps_val: "1"
            value: start_recording
          - dps_val: "2"
            value: error
  - entity: event
    name: Manual feed
    icon: "mdi:food-drumstick"
    dps:
      - id: 243
        type: integer
        name: event
        optional: true
        mapping:
          - dps_val: null
            value: null
          - value: feed
      - id: 243
        type: integer
        optional: true
        name: grams
        mapping:
          - scale: 10
  - entity: event
    name: Auto feed
    icon: "mdi:food-drumstick"
    dps:
      - id: 244
        type: integer
        name: event
        optional: true
        mapping:
          - dps_val: null
            value: null
          - value: feed
      - id: 244
        type: integer
        optional: true
        name: grams
        mapping:
          - scale: 10
  - entity: number
    name: Log offline feed
    category: config
    icon: "mdi:food-drumstick"
    dps:
      - id: 245
        type: integer
        optional: true
        name: value
        unit: portions
        range:
          min: 0
          max: 99
  - entity: event
    name: Feed
    icon: "mdi:food-drumstick"
    dps:
      - id: 246
        type: integer
        name: event
        optional: true
        mapping:
          - dps_val: null
            value: null
          - dps_val: 0
            value: fail
          - value: feed
      - id: 246
        type: integer
        optional: true
        name: portions
