name: Gate lock
products:
  - id: xrqkoapmq1rwjvms
    name: AGL Ultra Magic
primary_entity:
  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
secondary_entities:
  - 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
