<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="zwave"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
  xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0
                      https://openhab.org/schemas/thing-description/v1.0.0">

  <thing-type id="yale_yrl220_00_000" listed="false">
    <label>YRL220 Yale Real Living Touchscreen Lever Lock</label>
    <description><![CDATA[
Yale Real Living Touchscreen Lever Lock<br /><h1>Overview</h1><p>The Yale Real Living™ Stand-alone Touchscreen Lever Lock combines a robust lockset with a contemporary electronic aesthetic.</p> <p>Users benefit from an interactive touchscreen that makes day-to-day access effortless, as well as offering voice-guided programming for simple updates to user information in the event of staffing changes or security breaches. Yale Real Living™ is engineered for quick and easy installation and fits in place of a standard deadbolt lock door prep</p> <br /><h2>Inclusion Information</h2><p>To include the lock in a Z-Wave Network (taken from the installation manual:</p> <ol><li>Touch the lock screen to activate</li> <li>Enter the master pin and press #</li> <li>Press 7, then #</li> <li>Press 1, then #</li> </ol><p>The lock will now be in inclusion mode.</p> <br /><h2>Exclusion Information</h2><p>To exclude the lock from a Z-Wave Network (taken from the installation manual:</p> <ol><li>Touch the lock screen to activate</li> <li>Enter the master pin and press #</li> <li>Press 7, then #</li> <li>Press 3, then #</li> </ol><p>The lock will now be in exclusion mode.</p>
    ]]></description>
    <category>Lock</category>

    <!-- CHANNEL DEFINITIONS -->
    <channels>
      <channel id="lock_door" typeId="lock_door">
        <label>Door Lock</label>
        <properties>
          <property name="binding:*:OnOffType">COMMAND_CLASS_DOOR_LOCK</property>
        </properties>
      </channel>
      <channel id="alarm_general" typeId="alarm_general">
        <label>Alarm</label>
        <properties>
          <property name="binding:*:OnOffType">COMMAND_CLASS_ALARM</property>
        </properties>
      </channel>
      <channel id="alarm_raw" typeId="alarm_raw">
        <label>Alarm (raw)</label>
        <properties>
          <property name="binding:*:StringType">COMMAND_CLASS_ALARM</property>
        </properties>
      </channel>
      <channel id="battery-level" typeId="system.battery-level">
        <properties>
          <property name="binding:*:PercentType">COMMAND_CLASS_BATTERY</property>
        </properties>
      </channel>
    </channels>

    <!-- DEVICE PROPERTY DEFINITIONS -->
    <properties>
      <property name="vendor">ASSA ABLOY</property>
      <property name="modelId">YRL220</property>
      <property name="manufacturerId">0129</property>
      <property name="manufacturerRef">0000:2132,0001:0000,0001:0409,842A:3CAC</property>
      <property name="dbReference">379</property>
      <property name="defaultAssociations">1</property>
    </properties>

    <!-- CONFIGURATION DESCRIPTIONS -->
    <config-description>

      <!-- GROUP DEFINITIONS -->
      <parameter-group name="configuration">
        <context>setup</context>
        <label>Configuration Parameters</label>
      </parameter-group>

      <parameter-group name="association">
        <context>link</context>
        <label>Association Groups</label>
      </parameter-group>

      <!-- PARAMETER DEFINITIONS -->
      <parameter name="config_1_1" type="integer" groupName="configuration">
        <label>1: Audio Volume</label>
        <description><![CDATA[
Sets the volume level of the beeps and voice prompts<br /><h1>Overview</h1><p>1 = Silent</p> <p>2 = Low</p> <p>3 = High</p>
        ]]></description>
        <default>3</default>
        <options>
          <option value="1">Silent</option>
          <option value="2">Low</option>
          <option value="3">High</option>
        </options>
      </parameter>

      <parameter name="config_2_1" type="integer" groupName="configuration">
        <label>2: Auto Re-lock</label>
        <description><![CDATA[
When enabled, the unit will automatically re-lock<br /><h1>Overview</h1><p>0 = Off</p> <p>255 = On</p>
        ]]></description>
        <default>0</default>
        <options>
          <option value="0">Off</option>
          <option value="255">On</option>
        </options>
      </parameter>

      <parameter name="config_3_1" type="integer" groupName="configuration"
                 min="5" max="255">
        <label>3: Re-lock Time</label>
        <description>Time after unlocking that the device will lock</description>
        <default>30</default>
      </parameter>

      <parameter name="config_4_1" type="integer" groupName="configuration"
                 min="1" max="7">
        <label>4: Wrong Code Entry Limit</label>
        <description>The number of invalid tries before the lock shutdowns and sends an alarm</description>
        <default>5</default>
      </parameter>

      <parameter name="config_5_1" type="integer" groupName="configuration">
        <label>5: Language</label>
        <description><![CDATA[
Language used by the voice prompts<br /><h1>Overview</h1><p>1 = English</p> <p>2 = Spanish</p> <p>3 = French</p>
        ]]></description>
        <default>1</default>
        <options>
          <option value="1">English</option>
          <option value="2">Spanish</option>
          <option value="3">French</option>
        </options>
      </parameter>

      <parameter name="config_7_1" type="integer" groupName="configuration"
                 min="1" max="255">
        <label>7: Shutdown Time</label>
        <description>Number of times the device is locked out after the invalid retries are exceeded</description>
        <default>30</default>
      </parameter>

      <parameter name="config_8_1" type="integer" groupName="configuration">
        <label>8: Operating Mode</label>
        <description><![CDATA[
Sets if the unit operates normal, or disables keypad and Z-Wave lock/unlock<br /><h1>Overview</h1><p>0 = Normal</p> <p>1 = Vacation Mode (User Codes Disabled)</p> <p>2 = Privacy Mode (User Codes and ZWave Codes Disabled</p>
        ]]></description>
        <default>0</default>
        <options>
          <option value="0">Normal</option>
          <option value="1">Vacation Mode</option>
          <option value="3">Privacy Mode</option>
        </options>
      </parameter>

      <parameter name="config_11_1" type="integer" groupName="configuration">
        <label>11: One Touch Locking</label>
        <default>255</default>
        <options>
          <option value="0">Off</option>
          <option value="255">On</option>
        </options>
      </parameter>

      <parameter name="config_12_1" type="integer" groupName="configuration">
        <label>12: Privacy Button</label>
        <default>0</default>
        <options>
          <option value="0">Off</option>
          <option value="255">On</option>
        </options>
      </parameter>

      <parameter name="config_13_1" type="integer" groupName="configuration">
        <label>13: Lock Status LED</label>
        <default>0</default>
        <options>
          <option value="0">Off</option>
          <option value="255">On</option>
        </options>
      </parameter>

      <parameter name="config_15_1" type="integer" groupName="configuration">
        <label>15: Reset to Factory Defaults</label>
        <default>0</default>
        <options>
          <option value="1">Lock will execute Reset To Factory</option>
          <option value="2">Reserved for future use</option>
        </options>
      </parameter>

      <!-- ASSOCIATION DEFINITIONS -->
      <parameter name="group_1" type="text" groupName="association" multiple="true">
        <label>1: Alarm Reports</label>
        <description>Alarm reports are sent out to all devices in the association group</description>
        <multipleLimit>5</multipleLimit>
      </parameter>

      <!-- STATIC DEFINITIONS -->
      <parameter name="node_id" type="integer" min="1" max="232" readOnly="true" required="true">
        <label>Node ID</label>
        <advanced>true</advanced>
      </parameter>

    </config-description>

  </thing-type>

</thing:thing-descriptions>
