name: Camera
products:
  - id: 9waqosp1k5o0bqqh
    manufacturer: Kerui
    model: JS-P162 300W
  - id: o9jlvpqqunankygf
    manufacturer: Fuers
    model: "5MP"
    name: Indoor camera
entities:
  - entity: camera
    dps:
      - id: 105
        name: switch
        type: boolean
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true
      - id: 115
        name: snapshot
        type: base64
        optional: true
        sensitive: true
      - id: 134
        name: motion_enable
        type: boolean
      - id: 150
        name: record
        type: boolean
      - id: 212
        type: utf16b64
        optional: true
        name: push_message
      - id: 241
        type: string
        optional: true
        name: resolution_change
  - entity: light
    translation_key: indicator
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: switch
    name: Flip image
    icon: "mdi:flip-horizontal"
    category: config
    dps:
      - id: 103
        type: boolean
        name: switch
        mapping:
          - dps_val: null
            value: false
            hidden: true
  - entity: switch
    name: Watermark
    category: config
    icon: "mdi:watermark"
    dps:
      - id: 104
        type: boolean
        name: switch
        mapping:
          - dps_val: null
            value: false
            hidden: true
  - 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
          - dps_val: null
            value: Unknown
            hidden: true
  - entity: select
    name: Night vision
    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"
          - dps_val: null
            value: Unknown
            hidden: true
  - entity: sensor
    name: SD status
    class: enum
    translation_key: status
    category: diagnostic
    icon: "mdi:micro-sd"
    dps:
      - id: 110
        type: integer
        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
        name: capacity
  - entity: button
    name: SD format
    category: config
    icon: "mdi:micro-sd"
    dps:
      - id: 111
        type: boolean
        name: button
        optional: true
        persist: false
      - 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: button
    name: PTZ stop
    icon: "mdi:stop"
    category: config
    dps:
      - id: 116
        type: boolean
        name: button
        optional: true
        persist: false
  - entity: button
    name: PTZ up
    icon: "mdi:pan-up"
    category: config
    dps:
      - id: 119
        type: string
        optional: true
        name: button
        mapping:
          - dps_val: "0"
            value: true
          - value: false
  - entity: button
    name: PTZ right-up
    icon: "mdi:top-right"
    category: config
    dps:
      - id: 119
        type: string
        optional: true
        name: button
        mapping:
          - dps_val: "1"
            value: true
          - value: false
  - entity: button
    name: PTZ right
    icon: "mdi:pan-right"
    category: config
    dps:
      - id: 119
        type: string
        name: button
        optional: true
        mapping:
          - dps_val: "2"
            value: true
          - value: false
  - entity: button
    name: PTZ right-down
    icon: "mdi:pan-bottom-right"
    category: config
    dps:
      - id: 119
        type: string
        name: button
        optional: true
        mapping:
          - dps_val: "3"
            value: true
          - value: false
  - entity: button
    name: PTZ down
    icon: "mdi:pan-down"
    category: config
    dps:
      - id: 119
        type: string
        name: button
        optional: true
        mapping:
          - dps_val: "4"
            value: true
          - value: false
  - entity: button
    name: PTZ left-down
    icon: "mdi:pan-bottom-left"
    category: config
    dps:
      - id: 119
        type: string
        name: button
        optional: true
        mapping:
          - dps_val: "5"
            value: true
          - value: false
  - entity: button
    name: PTZ left
    icon: "mdi:pan-left"
    category: config
    dps:
      - id: 119
        type: string
        name: button
        optional: true
        mapping:
          - dps_val: "6"
            value: true
          - value: false
  - entity: button
    name: PTZ left-up
    icon: "mdi:pan-top-left"
    category: config
    dps:
      - id: 119
        type: string
        name: button
        optional: true
        mapping:
          - dps_val: "7"
            value: true
          - value: false
  - entity: select
    name: Recording mode
    icon: "mdi:file-video"
    category: config
    dps:
      - id: 151
        type: string
        name: option
        mapping:
          - dps_val: "1"
            value: Event
          - dps_val: "2"
            value: Continuous
  - entity: number
    name: Volume
    category: config
    icon: "mdi:volume-high"
    dps:
      - id: 160
        type: integer
        name: value
        unit: "%"
        range:
          min: 1
          max: 100
  - entity: switch
    name: Motion tracking
    icon: "mdi:motion"
    category: config
    dps:
      - id: 161
        type: boolean
        name: switch
  - entity: event
    class: motion
    dps:
      - id: 239
        type: string
        name: event
        optional: true
        mapping:
          - dps_val: motion
            value: detected
      - id: 115
        type: base64
        optional: true
        sensitive: true
        name: image_details
      - id: 185
        type: utf16b64
        optional: true
        persist: false
        name: alarm_message
