name: Door lock
products:
  - id: a6nttc41
    manufacturer: Intelbras
    model: IFR 7000
entities:
  - entity: lock
    dps:
      - id: 1
        type: integer
        name: unlock_fingerprint
        optional: true
        persist: false
      - id: 2
        type: integer
        name: unlock_password
        optional: true
        persist: false
      - id: 3
        type: integer
        name: unlock_temp_pwd
        optional: true
        persist: false
      - id: 4
        type: integer
        name: unlock_dynamic_pwd
        optional: true
        persist: false
      - id: 5
        type: integer
        name: unlock_card
        optional: true
        persist: false
      - id: 7
        type: integer
        name: unlock_key
        optional: true
        persist: false
      - id: 8
        type: boolean
        name: lock_state
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true
      - id: 9
        type: string
        name: alarm
        optional: true
      - id: 22
        type: boolean
        optional: true
        name: remote_result
      - id: 41
        type: integer
        optional: true
        persist: false
        name: unlock_app
      - id: 47
        type: string
        name: lock_raw
        optional: true
      - id: 57
        type: boolean
        name: lock_motor_status
        optional: true
      - id: 62
        type: integer
        optional: true
        persist: false
        name: unlock_voice
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 10
        type: integer
        name: sensor
        optional: true
        unit: "%"
  - entity: select
    name: Key volume
    icon: "mdi:dialpad"
    category: config
    dps:
      - id: 19
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: mute
            value: Mute
          - dps_val: low
            value: Low
          - dps_val: normal
            value: Mid
          - dps_val: high
            value: High
  - entity: button
    name: Enable remote unlock
    category: config
    dps:
      - id: 23
        type: boolean
        name: button
        optional: true
  - entity: button
    name: Disable remote unlock
    category: config
    dps:
      - id: 23
        type: boolean
        name: button
        optional: true
        mapping:
          - dps_val: false
            value: true
  - entity: event
    name: Hijack
    category: diagnostic
    dps:
      - id: 35
        type: boolean
        name: event
        optional: true
        mapping:
          - dps_val: true
            value: hijack
          - dps_val: false
            value: clear
  - entity: event
    name: Door open
    category: diagnostic
    dps:
      - id: 38
        type: boolean
        optional: true
        name: event
        mapping:
          - dps_val: true
            value: opened
          - dps_val: false
            value: closed
  - entity: switch
    name: One time password enabled
    category: config
    dps:
      - id: 61
        type: boolean
        name: switch
        optional: true
        mapping:
          - dps_val: null
            value: true
            hidden: true

# The following are documented as write-only values with raw format, so
# are not supported.
#  24 = password_create, 25 = password_delete, 26 = password_update,
#  27 = password_disable, 28 = password_enable, 39 = password_reset (rw),
#  48 = remote_no_pd_setkey (rw), 49 = remote_no_dp_key (rw),
#  54 = unlock__method_create (rw), 55 = unlock_method_delete (rw),
