name: Doorbell
products:
  - id: 0ukszkfaejkqpz9o
    name: KW02 IP video doorbell
primary_entity:
  entity: siren
  name: Doorbell
  dps:
    - id: 156
      type: string
      optional: true
      name: tone
      mapping:
        - dps_val: "1"
          value: Tone 1
        - dps_val: "2"
          value: Tone 2
        - dps_val: "3"
          value: Tone 3
        - dps_val: "4"
          value: Tone 4
    - id: 157
      type: integer
      optional: true
      name: volume_level
      range:
        min: 0
        max: 10
      mapping:
        - scale: 10
    - id: 166
      type: integer
      optional: true
      name: duration
      range:
        min: 5
        max: 60
    - id: 186
      type: string
      optional: true
      name: alarm_report
secondary_entities:
  - 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: select
    name: Motion sensitivity
    icon: "mdi:motion"
    category: config
    dps:
      - id: 106
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "0"
            value: Low
          - dps_val: "1"
            value: Medium
          - dps_val: "2"
            value: High
  - entity: button
    name: SD format
    icon: "mdi:sd"
    category: config
    dps:
      - id: 111
        type: boolean
        optional: true
        name: button
      - id: 109
        type: string
        optional: true
        name: capacity
      - id: 110
        type: integer
        optional: true
        name: sd_status
      - id: 117
        type: integer
        optional: true
        name: formatting_status
  - entity: camera
    dps:
      - id: 115
        type: base64
        optional: true
        name: motion_detected
      - id: 134
        type: boolean
        optional: true
        name: motion_enable
      - id: 154
        type: base64
        optional: true
        name: snapshot
        mapping:
          - dps_val: null
            value_redirect: motion_detected
  - entity: event
    class: doorbell
    dps:
      - id: 136
        type: string
        name: event
        optional: true
        mapping:
          - dps_val: ""
            value: null
          - dps_val: null
            value: null
          - value: ring
      - id: 136
        type: string
        optional: true
        name: raw_event
  - entity: number
    name: Volume
    category: config
    icon: "mdi:volume-high"
    dps:
      - id: 160
        type: integer
        optional: true
        name: value
        unit: "%"
        range:
          min: 1
          max: 10
        mapping:
          - scale: 0.1
  - entity: button
    class: restart
    category: config
    dps:
      - id: 162
        type: boolean
        optional: true
        name: button
