name: Gate lock
products:
  - id: xrqkoapmq1rwjvms
    manufacturer: AGL
    name: Ultra Magic gate lock
entities:
  - entity: cover
    class: gate
    dps:
      - id: 118
        type: boolean
        name: control
        optional: true
        mapping:
          - dps_val: true
            value: open
          - dps_val: false
            value: close
      - id: 3
        type: boolean
        name: action
        mapping:
          - dps_val: false
            value: opened
          - dps_val: true
            value: closed
  - entity: select
    category: config
    name: Beep
    icon: "mdi:volume-high"
    dps:
      - id: 103
        name: option
        type: string
        mapping:
          - dps_val: Silensioso
            value: Mute
          - dps_val: Baixo
            value: Low
          - dps_val: Médio
            value: Medium
          - dps_val: Alto
            value: High
  - entity: switch
    category: config
    name: Allow intercom unlock
    icon: "mdi:doorbell"
    dps:
      - id: 105
        name: switch
        type: boolean
  - entity: switch
    category: config
    name: Allow inside button unlock
    icon: "mdi:gesture-tap-button"
    dps:
      - id: 104
        name: switch
        type: boolean
  - entity: switch
    category: config
    name: Allow IC card unlock
    icon: "mdi:nfc-variant"
    dps:
      - id: 109
        name: switch
        type: boolean
  - entity: switch
    category: config
    name: Enable interlock
    icon: "mdi:lock-pattern"
    dps:
      - id: 108
        name: switch
        type: boolean
  - entity: switch
    category: config
    name: Auto lock after closed
    icon: "mdi:lock-check-outline"
    dps:
      - id: 107
        name: switch
        type: boolean
  - entity: number
    category: config
    name: Lock timeout
    icon: "mdi:lock-clock"
    dps:
      - id: 102
        name: value
        type: integer
        range:
          min: 1
          max: 5
        unit: s
  - entity: number
    category: config
    icon: "mdi:clock-end"
    name: Auto lock timeout
    dps:
      - id: 115
        name: value
        type: integer
        range:
          min: 1
          max: 1200
        unit: s
  - entity: number
    category: config
    icon: "mdi:alarm"
    name: Open alarm time
    mode: box
    dps:
      - id: 106
        name: value
        type: integer
        range:
          min: 0
          max: 100
        unit: s

  - entity: number
    category: config
    name: Record tag ID
    icon: "mdi:nfc-variant"
    dps:
      - id: 101
        name: value
        type: integer
        range:
          min: 0
          max: 2000
  - entity: number
    category: config
    name: Delete tag ID
    icon: "mdi:nfc-variant-off"
    dps:
      - id: 110
        name: value
        type: integer
        range:
          min: 0
          max: 100000

  - entity: switch
    category: config
    name: Open door notification
    icon: "mdi:bell-alert"
    dps:
      - id: 112
        name: switch
        type: boolean
  - entity: switch
    category: config
    name: Close door notification
    icon: "mdi:bell-check"
    dps:
      - id: 113
        name: switch
        type: boolean
  - entity: select
    category: config
    name: Backup options
    icon: "mdi:backup-restore"
    dps:
      - id: 114
        name: option
        type: string
        mapping:
          - dps_val: Selecionar
            value: Select
          - dps_val: Upload
            value: Upload
          - dps_val: Download
            value: Download

  - entity: binary_sensor
    name: App status
    icon: "mdi:cellphone"
    dps:
      - id: 122
        name: sensor
        type: boolean

  - entity: binary_sensor
    name: Digital unlock
    class: door
    dps:
      - id: 124
        name: sensor
        type: boolean
  - entity: switch
    category: config
    name: Open door beep
    icon: "mdi:volume-high"
    dps:
      - id: 125
        name: switch
        type: boolean

  - entity: binary_sensor
    name: Mechanical key unlock
    class: door
    dps:
      - id: 129
        name: sensor
        type: boolean
