name: Doorbell
products:
  - id: h3bhzu9m0ig80rdu
    manufacturer: Bcom
    model: Majic IPBox
entities:
  - entity: camera
    dps:
      - id: 150
        name: record
        type: boolean
        optional: true
      - id: 154
        name: snapshot
        type: base64
        persist: false
        optional: true
        sensitive: true
        mapping:
          - dps_val: ""
            value_redirect: motion_detected
          - dps_val: null
            value_redirect: motion_detected
      - id: 115
        name: motion_detected
        type: base64
        optional: true
        sensitive: true
  - entity: lock
    name: Door lock
    dps:
      - id: 232
        type: boolean
        optional: true
        name: lock
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true
  - 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
        optional: true
        name: switch
  - entity: switch
    name: Watermark
    category: config
    icon: "mdi:watermark"
    dps:
      - id: 104
        type: boolean
        optional: true
        name: switch
  - entity: select
    name: Motion detection
    icon: "mdi:motion-sensor"
    category: config
    dps:
      - id: 106
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: "0"
            value: Low
          - dps_val: "1"
            value: Medium
          - dps_val: "2"
            value: High
  - 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
    class: enum
    translation_key: status
    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
      - id: 109
        type: string
        optional: true
        name: capacity
  - entity: button
    name: SD format
    category: config
    icon: "mdi:micro-sd"
    dps:
      - id: 111
        type: boolean
        optional: true
        name: button
      - id: 117
        type: integer
        optional: true
        name: status
        mapping:
          - dps_val: 2000
            value: Formatting
          - dps_val: 2001
            value: Format error
          - dps_val: 2002
            value: Card missing
          - dps_val: 2003
            value: Card error
  - entity: select
    name: Recording mode
    icon: "mdi:file-video"
    category: config
    dps:
      - id: 151
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: "1"
            value: Event
          - dps_val: "2"
            value: Continuous
  - entity: button
    category: config
    class: restart
    dps:
      - id: 162
        type: boolean
        optional: true
        name: button
  - entity: sensor
    name: Channel
    icon: "mdi:ab-testing"
    category: diagnostic
    dps:
      - id: 231
        type: string
        optional: true
        name: sensor
  - entity: event
    class: doorbell
    dps:
      - id: 136
        type: string
        name: event
        optional: true
        mapping:
          - dps_val: null
            value: null
          - dps_val: ""
            value: null
          - value: ring
      - id: 136
        type: string
        optional: true
        name: message
  - entity: lock
    name: Accessory lock
    dps:
      - id: 148
        type: boolean
        optional: true
        name: lock
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true
