Skip to content

Commit

Permalink
Add embedded device configure to matter-lock driver for unlatch
Browse files Browse the repository at this point in the history
Signed-off-by: Hunsup Jung <[email protected]>
  • Loading branch information
HunsupJung committed Nov 26, 2024
1 parent b002d61 commit e2d8f58
Show file tree
Hide file tree
Showing 6 changed files with 397 additions and 6 deletions.
82 changes: 81 additions & 1 deletion drivers/SmartThings/matter-lock/profiles/lock-unlatch.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: lock-unlatch
components:
- id: main
- label: Main
id: main
capabilities:
- id: lock
version: 1
Expand All @@ -10,6 +11,7 @@ components:
enabledValues:
- locked
- unlocked
- unlatched
- not fully locked
- id: lockAlarm
version: 1
Expand All @@ -21,3 +23,81 @@ components:
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}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: lock-user-pin-schedule-unlatch
components:
- id: main
- label: Main
id: main
capabilities:
- id: lock
version: 1
Expand All @@ -10,6 +11,7 @@ components:
enabledValues:
- locked
- unlocked
- unlatched
- not fully locked
- id: lockAlarm
version: 1
Expand All @@ -27,3 +29,81 @@ components:
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}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: lock-user-pin-unlatch
components:
- id: main
- label: Main
id: main
capabilities:
- id: lock
version: 1
Expand All @@ -10,6 +11,7 @@ components:
enabledValues:
- locked
- unlocked
- unlatched
- not fully locked
- id: lockAlarm
version: 1
Expand All @@ -25,3 +27,81 @@ components:
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}}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: lock-user-schedule-unlatch
components:
- id: main
- label: Main
id: main
capabilities:
- id: lock
version: 1
Expand All @@ -10,6 +11,7 @@ components:
enabledValues:
- locked
- unlocked
- unlatched
- not fully locked
- id: lockAlarm
version: 1
Expand All @@ -25,3 +27,64 @@ components:
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
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

0 comments on commit e2d8f58

Please sign in to comment.