Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Unlatch command and Unlatched status (Unbolt feature) #1756

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions drivers/SmartThings/matter-lock/profiles/lock-unlatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: lock-unlatch
components:
- label: Main
id: main
capabilities:
- id: lock
version: 1
config:
values:
- key: "lock.value"
enabledValues:
tpmanley marked this conversation as resolved.
Show resolved Hide resolved
- locked
- unlocked
- unlatched
- not fully locked
- id: lockAlarm
version: 1
- id: remoteControlStatus
version: 1
- id: firmwareUpdate
version: 1
- id: refresh
version: 1
categories:
- name: SmartLock
deviceConfig:
dashboard:
states:
- component: main
capability: lock
version: 1
actions:
- component: main
capability: lock
version: 1
detailView:
- component: main
capability: lock
version: 1
values:
- key: lock.value
alternatives:
- key: locked
type: inactive
value: '{{i18n.attributes.lock.i18n.value.locked.label}}'
- key: unlocked
value: '{{i18n.attributes.lock.i18n.value.unlocked.label}}'
- key: unlatched
value: '{{i18n.attributes.lock.i18n.value.unlatched.label}}'
- key: unknown
type: inactive
value: '{{i18n.attributes.lock.i18n.value.unknown.label}}'
- key: unlocked with timeout
value: '{{i18n.attributes.lock.i18n.value.unlocked with timeout.label}}'
- key: not fully locked
value: '{{i18n.attributes.lock.i18n.value.not fully locked.label}}'
patch:
- op: add
path: /1
value:
capability: lock
version: 1
component: main
label: '{{i18n.commands.unlatch.label}}'
displayType: pushButton
pushButton:
command: unlatch
automation:
conditions:
- component: main
capability: lock
version: 1
values:
- key: lock.value
alternatives:
- key: locked
type: inactive
value: '{{i18n.attributes.lock.i18n.value.locked.label}}'
- key: unlocked
value: '{{i18n.attributes.lock.i18n.value.unlocked.label}}'
- key: unlatched
value: '{{i18n.attributes.lock.i18n.value.unlatched.label}}'
- key: unknown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to include unknown or unlocked with timeout since these are not included in enabledValues

type: inactive
value: '{{i18n.attributes.lock.i18n.value.unknown.label}}'
- key: unlocked with timeout
value: '{{i18n.attributes.lock.i18n.value.unlocked with timeout.label}}'
- key: not fully locked
value: '{{i18n.attributes.lock.i18n.value.not fully locked.label}}'
actions:
- component: main
capability: lock
version: 1
values:
- key: '{{enumCommands}}'
alternatives:
- key: lock
type: inactive
value: '{{i18n.commands.lock.label}}'
- key: unlock
value: '{{i18n.commands.unlock.label}}'
- key: unlatch
value: '{{i18n.commands.unlatch.label}}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: lock-user-pin-schedule-unlatch
components:
- label: Main
id: main
capabilities:
- id: lock
version: 1
config:
values:
- key: "lock.value"
enabledValues:
- locked
- unlocked
- unlatched
- not fully locked
- id: lockAlarm
version: 1
- id: remoteControlStatus
version: 1
- id: lockUsers
version: 1
- id: lockCredentials
version: 1
- id: lockSchedules
version: 1
- id: firmwareUpdate
version: 1
- id: refresh
version: 1
categories:
- name: SmartLock
deviceConfig:
dashboard:
states:
- component: main
capability: lock
version: 1
actions:
- component: main
capability: lock
version: 1
detailView:
- component: main
capability: lock
version: 1
values:
- key: lock.value
alternatives:
- key: locked
type: inactive
value: '{{i18n.attributes.lock.i18n.value.locked.label}}'
- key: unlocked
value: '{{i18n.attributes.lock.i18n.value.unlocked.label}}'
- key: unlatched
value: '{{i18n.attributes.lock.i18n.value.unlatched.label}}'
- key: unknown
type: inactive
value: '{{i18n.attributes.lock.i18n.value.unknown.label}}'
- key: unlocked with timeout
value: '{{i18n.attributes.lock.i18n.value.unlocked with timeout.label}}'
- key: not fully locked
value: '{{i18n.attributes.lock.i18n.value.not fully locked.label}}'
patch:
- op: add
path: /1
value:
capability: lock
version: 1
component: main
label: '{{i18n.commands.unlatch.label}}'
displayType: pushButton
pushButton:
command: unlatch
automation:
conditions:
- component: main
capability: lock
version: 1
values:
- key: lock.value
alternatives:
- key: locked
type: inactive
value: '{{i18n.attributes.lock.i18n.value.locked.label}}'
- key: unlocked
value: '{{i18n.attributes.lock.i18n.value.unlocked.label}}'
- key: unlatched
value: '{{i18n.attributes.lock.i18n.value.unlatched.label}}'
- key: unknown
type: inactive
value: '{{i18n.attributes.lock.i18n.value.unknown.label}}'
- key: unlocked with timeout
value: '{{i18n.attributes.lock.i18n.value.unlocked with timeout.label}}'
- key: not fully locked
value: '{{i18n.attributes.lock.i18n.value.not fully locked.label}}'
actions:
- component: main
capability: lock
version: 1
values:
- key: '{{enumCommands}}'
alternatives:
- key: lock
type: inactive
value: '{{i18n.commands.lock.label}}'
- key: unlock
value: '{{i18n.commands.unlock.label}}'
- key: unlatch
value: '{{i18n.commands.unlatch.label}}'
107 changes: 107 additions & 0 deletions drivers/SmartThings/matter-lock/profiles/lock-user-pin-unlatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: lock-user-pin-unlatch
components:
- label: Main
id: main
capabilities:
- id: lock
version: 1
config:
values:
- key: "lock.value"
enabledValues:
- locked
- unlocked
- unlatched
- not fully locked
- id: lockAlarm
version: 1
- id: remoteControlStatus
version: 1
- id: lockUsers
version: 1
- id: lockCredentials
version: 1
- id: firmwareUpdate
version: 1
- id: refresh
version: 1
categories:
- name: SmartLock
deviceConfig:
dashboard:
states:
- component: main
capability: lock
version: 1
actions:
- component: main
capability: lock
version: 1
detailView:
- component: main
capability: lock
version: 1
values:
- key: lock.value
alternatives:
- key: locked
type: inactive
value: '{{i18n.attributes.lock.i18n.value.locked.label}}'
- key: unlocked
value: '{{i18n.attributes.lock.i18n.value.unlocked.label}}'
- key: unlatched
value: '{{i18n.attributes.lock.i18n.value.unlatched.label}}'
- key: unknown
type: inactive
value: '{{i18n.attributes.lock.i18n.value.unknown.label}}'
- key: unlocked with timeout
value: '{{i18n.attributes.lock.i18n.value.unlocked with timeout.label}}'
- key: not fully locked
value: '{{i18n.attributes.lock.i18n.value.not fully locked.label}}'
patch:
- op: add
path: /1
value:
capability: lock
version: 1
component: main
label: '{{i18n.commands.unlatch.label}}'
displayType: pushButton
pushButton:
command: unlatch
automation:
conditions:
- component: main
capability: lock
version: 1
values:
- key: lock.value
alternatives:
- key: locked
type: inactive
value: '{{i18n.attributes.lock.i18n.value.locked.label}}'
- key: unlocked
value: '{{i18n.attributes.lock.i18n.value.unlocked.label}}'
- key: unlatched
value: '{{i18n.attributes.lock.i18n.value.unlatched.label}}'
- key: unknown
type: inactive
value: '{{i18n.attributes.lock.i18n.value.unknown.label}}'
- key: unlocked with timeout
value: '{{i18n.attributes.lock.i18n.value.unlocked with timeout.label}}'
- key: not fully locked
value: '{{i18n.attributes.lock.i18n.value.not fully locked.label}}'
actions:
- component: main
capability: lock
version: 1
values:
- key: '{{enumCommands}}'
alternatives:
- key: lock
type: inactive
value: '{{i18n.commands.lock.label}}'
- key: unlock
value: '{{i18n.commands.unlock.label}}'
- key: unlatch
value: '{{i18n.commands.unlatch.label}}'
Loading
Loading