Skip to content

Commit

Permalink
Merge Switch and Button Drivers (#1547)
Browse files Browse the repository at this point in the history
Merge Switch and Button Drivers

These changes integrate the matter-button driver into the matter-switch
driver so we can deprecate the matter-button driver.
  • Loading branch information
nickolas-deboom authored Sep 6, 2024
1 parent bc897af commit 7bdefe1
Show file tree
Hide file tree
Showing 22 changed files with 1,986 additions and 72 deletions.
13 changes: 0 additions & 13 deletions drivers/SmartThings/matter-button/fingerprints.yml

This file was deleted.

7 changes: 7 additions & 0 deletions drivers/SmartThings/matter-button/src/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-- As of September 2024, the matter-button driver has been deprecated in favor of being integrated into the matter-switch
-- driver. All functionality and test cases present in this driver were carried over into matter-switch. Therefore,
-- we are no longer accepting bug fixes or feature enhancements such as fingerprint adds to this driver.
-- Note that this change won't affect devices using the button driver unless they are re-onboarded, in which case
-- they would onboard to the switch driver, as all button fingerprints were removed from this driver and moved to
-- the switch driver.

local capabilities = require "st.capabilities"
local log = require "log"
local clusters = require "st.matter.generated.zap_clusters"
Expand Down
11 changes: 11 additions & 0 deletions drivers/SmartThings/matter-switch/fingerprints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,12 @@ matterManufacturer:
vendorId: 0x139C
productId: 0xAB01
deviceProfileName: switch-binary
#TUO
- id: "5150/1"
deviceLabel: "TUO Smart Button"
vendorId: 0x141E
productId: 0x0001
deviceProfileName: "button-battery"


#Bridge devices need manufacturer specific fingerprints until
Expand Down Expand Up @@ -2335,6 +2341,11 @@ matterGeneric:
deviceTypes:
- id: 0x010B # Dimmable Plug-in Unit
deviceProfileName: plug-level
- id: "button"
deviceLabel: Matter Button
deviceTypes:
- id: 0x000F
deviceProfileName: button-battery # err on the side of buttons having batteries, it'll get fixed in the driver

matterThing:
- id: SmartThings/MatterThing
Expand Down
20 changes: 20 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/2-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 2-button-battery
components:
- id: main
capabilities:
- id: button
version: 1
- id: battery
version: 1
- id: firmwareUpdate
version: 1
- id: refresh
version: 1
categories:
- name: RemoteController
- id: button2
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
18 changes: 18 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/2-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 2-button
components:
- id: main
capabilities:
- id: button
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 drivers/SmartThings/matter-switch/profiles/3-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 3-button-battery
components:
- id: main
capabilities:
- id: button
version: 1
- id: battery
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
24 changes: 24 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/3-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 3-button
components:
- id: main
capabilities:
- id: button
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 drivers/SmartThings/matter-switch/profiles/4-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 4-button-battery
components:
- id: main
capabilities:
- id: button
version: 1
- id: battery
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
30 changes: 30 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/4-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 4-button
components:
- id: main
capabilities:
- id: button
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 drivers/SmartThings/matter-switch/profiles/5-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 5-button-battery
components:
- id: main
capabilities:
- id: button
version: 1
- id: battery
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
36 changes: 36 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/5-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 5-button
components:
- id: main
capabilities:
- id: button
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 drivers/SmartThings/matter-switch/profiles/6-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 6-button-battery
components:
- id: main
capabilities:
- id: button
version: 1
- id: battery
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
42 changes: 42 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/6-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 6-button
components:
- id: main
capabilities:
- id: button
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
Loading

0 comments on commit 7bdefe1

Please sign in to comment.