-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the profile selection logic in matter-switch by reading the AttributeList, checking if BatPercentRemaining or BatChargeLevel is available, and then profile the device as needed.
- Loading branch information
1 parent
95be9d1
commit cd45c95
Showing
12 changed files
with
393 additions
and
17 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
drivers/SmartThings/matter-switch/profiles/2-button-batteryLevel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: 2-button-batteryLevel | ||
components: | ||
- id: main | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
- id: batteryLevel | ||
version: 1 | ||
- id: firmwareUpdate | ||
version: 1 | ||
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button2 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController |
26 changes: 26 additions & 0 deletions
26
drivers/SmartThings/matter-switch/profiles/3-button-batteryLevel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 3-button-batteryLevel | ||
components: | ||
- id: main | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
- id: batteryLevel | ||
version: 1 | ||
- id: firmwareUpdate | ||
version: 1 | ||
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button2 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button3 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController |
32 changes: 32 additions & 0 deletions
32
drivers/SmartThings/matter-switch/profiles/4-button-batteryLevel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 4-button-batteryLevel | ||
components: | ||
- id: main | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
- id: batteryLevel | ||
version: 1 | ||
- id: firmwareUpdate | ||
version: 1 | ||
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button2 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button3 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button4 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController |
38 changes: 38 additions & 0 deletions
38
drivers/SmartThings/matter-switch/profiles/5-button-batteryLevel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 5-button-batteryLevel | ||
components: | ||
- id: main | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
- id: batteryLevel | ||
version: 1 | ||
- id: firmwareUpdate | ||
version: 1 | ||
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button2 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button3 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button4 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button5 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController |
44 changes: 44 additions & 0 deletions
44
drivers/SmartThings/matter-switch/profiles/6-button-batteryLevel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: 6-button-batteryLevel | ||
components: | ||
- id: main | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
- id: batteryLevel | ||
version: 1 | ||
- id: firmwareUpdate | ||
version: 1 | ||
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button2 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button3 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button4 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button5 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button6 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController |
50 changes: 50 additions & 0 deletions
50
drivers/SmartThings/matter-switch/profiles/7-button-batteryLevel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: 7-button-batteryLevel | ||
components: | ||
- id: main | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
- id: batteryLevel | ||
version: 1 | ||
- id: firmwareUpdate | ||
version: 1 | ||
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button2 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button3 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button4 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button5 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button6 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button7 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController |
57 changes: 57 additions & 0 deletions
57
drivers/SmartThings/matter-switch/profiles/8-button-batteryLevel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: 8-button-batteryLevel | ||
components: | ||
- id: main | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
- id: batteryLevel | ||
version: 1 | ||
- id: firmwareUpdate | ||
version: 1 | ||
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button2 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button3 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button4 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button5 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button6 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button7 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
- id: button8 | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
categories: | ||
- name: RemoteController | ||
|
14 changes: 14 additions & 0 deletions
14
drivers/SmartThings/matter-switch/profiles/button-batteryLevel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: button-batteryLevel | ||
components: | ||
- id: main | ||
capabilities: | ||
- id: button | ||
version: 1 | ||
- id: batteryLevel | ||
version: 1 | ||
- id: firmwareUpdate | ||
version: 1 | ||
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: Button |
Oops, something went wrong.