Skip to content

Commit ad1dc95

Browse files
authored
Merge branch 'SmartThingsCommunity:main' into appartme-flood-sensor
2 parents 7512977 + 59aea94 commit ad1dc95

48 files changed

Lines changed: 4356 additions & 163 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/jenkins-driver-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
version:
12-
[ 59, 60, dev]
12+
[ 59, 60, 61, dev]
1313

1414
runs-on: ubuntu-latest
1515
steps:

drivers/Aqara/aqara-bath-heater/profiles/aqara-bath-heater.yml

Lines changed: 3 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -8,165 +8,18 @@ components:
88
version: 1
99
- id: colorTemperature
1010
version: 1
11-
config:
12-
values:
13-
- key: "colorTemperature.value"
14-
range: [2700, 6500]
1511
- id: thermostatMode
1612
version: 1
17-
config:
18-
values:
19-
- key: "thermostatMode.value"
20-
enabledValues:
21-
- "off"
22-
- "heat"
23-
- "dryair"
24-
- "cool"
25-
- "fanonly"
2613
- id: thermostatHeatingSetpoint
2714
version: 1
28-
config:
29-
values:
30-
- key: "thermostatHeatingSetpoint.value"
31-
range: [16, 45]
32-
unit: "C"
3315
- id: fanOscillationMode
3416
version: 1
35-
config:
36-
values:
37-
- key: "fanOscillationMode.value"
38-
enabledValues:
39-
- "swing"
40-
- "fixed"
4117
- id: fanMode
4218
version: 1
43-
config:
44-
values:
45-
- key: "fanMode.value"
46-
enabledValues:
47-
- "low"
48-
- "medium"
49-
- "high"
5019
- id: refresh
5120
version: 1
5221
categories:
5322
- name: Thermostat
54-
deviceConfig:
55-
dashboard:
56-
states:
57-
- component: main
58-
capability: switch
59-
version: 1
60-
- component: main
61-
capability: fanMode
62-
version: 1
63-
actions:
64-
- component: main
65-
capability: switch
66-
version: 1
67-
detailView:
68-
- component: main
69-
capability: switch
70-
version: 1
71-
- component: main
72-
capability: switchLevel
73-
version: 1
74-
- component: main
75-
capability: colorTemperature
76-
version: 1
77-
- component: main
78-
capability: thermostatMode
79-
version: 1
80-
- component: main
81-
capability: thermostatHeatingSetpoint
82-
version: 1
83-
visibleCondition:
84-
component: main
85-
capability: thermostatMode
86-
version: 1
87-
value: thermostatMode.value
88-
operator: EQUALS
89-
operand: "heat"
90-
- component: main
91-
capability: fanOscillationMode
92-
version: 1
93-
visibleCondition:
94-
component: main
95-
capability: thermostatMode
96-
version: 1
97-
value: thermostatMode.value
98-
operator: ONE_OF
99-
operand: '["heat", "dryair", "cool"]'
100-
- component: main
101-
capability: fanMode
102-
version: 1
103-
visibleCondition:
104-
component: main
105-
capability: thermostatMode
106-
version: 1
107-
value: thermostatMode.value
108-
operator: ONE_OF
109-
operand: '["heat", "dryair", "cool", "fanonly"]'
110-
- component: main
111-
capability: refresh
112-
version: 1
113-
automation:
114-
conditions:
115-
- component: main
116-
capability: switch
117-
version: 1
118-
- component: main
119-
capability: switchLevel
120-
version: 1
121-
- component: main
122-
capability: colorTemperature
123-
version: 1
124-
- component: main
125-
capability: thermostatMode
126-
version: 1
127-
- component: main
128-
capability: thermostatHeatingSetpoint
129-
version: 1
130-
- component: main
131-
capability: fanOscillationMode
132-
version: 1
133-
- component: main
134-
capability: fanMode
135-
version: 1
136-
values:
137-
- key: "fanMode.value"
138-
enabledValues:
139-
- "low"
140-
- "medium"
141-
- "high"
142-
actions:
143-
- component: main
144-
capability: switch
145-
version: 1
146-
- component: main
147-
capability: switchLevel
148-
version: 1
149-
- component: main
150-
capability: colorTemperature
151-
version: 1
152-
- component: main
153-
capability: thermostatMode
154-
version: 1
155-
- component: main
156-
capability: thermostatHeatingSetpoint
157-
version: 1
158-
- component: main
159-
capability: fanOscillationMode
160-
version: 1
161-
- component: main
162-
capability: fanMode
163-
version: 1
164-
values:
165-
- key: "setFanMode.fanMode"
166-
enabledValues:
167-
- "low"
168-
- "medium"
169-
- "high"
17023
preferences:
17124
- preferenceId: stse.nightLightMode
17225
explicit: true
@@ -178,3 +31,6 @@ preferences:
17831
explicit: true
17932
- preferenceId: stse.thermostatCtrl
18033
explicit: true
34+
metadata:
35+
mnmn: SolutionsEngineering
36+
vid: SmartThings-smartthings-Aqara_Bath_Heater

drivers/Aqara/aqara-bath-heater/src/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ local function device_added(driver, device)
429429
capabilities.fanOscillationMode.fanOscillationMode.NAME) == nil then
430430
device:emit_event(capabilities.fanOscillationMode.fanOscillationMode(OSC.SWING))
431431
end
432+
device:emit_event(capabilities.colorTemperature.colorTemperatureRange({ value = {minimum = 2700, maximum = 6500} }))
432433
end
433434

434435
local function send_night_light(device, new)

drivers/Aqara/aqara-bath-heater/src/test/test_aqara_bath_heater.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ test.register_coroutine_test(
619619
capabilities.fanMode.fanMode("medium")))
620620
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
621621
capabilities.fanOscillationMode.fanOscillationMode("swing")))
622+
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
623+
capabilities.colorTemperature.colorTemperatureRange({ value = {minimum = 2700, maximum = 6500} })))
622624
end
623625
)
624626

drivers/SmartThings/matter-lock/fingerprints.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ matterManufacturer:
2525
vendorId: 0x115F
2626
productId: 0x2804
2727
deviceProfileName: lock
28+
- id: "4447/10255"
29+
deviceLabel: Aqara Smart Lock U500 Rim
30+
vendorId: 0x115F
31+
productId: 0x280F
32+
deviceProfileName: lock-modular
33+
- id: "4447/10256"
34+
deviceLabel: Aqara Smart Lock U500 Glass Door
35+
vendorId: 0x115F
36+
productId: 0x2810
37+
deviceProfileName: lock-modular
38+
- id: "4447/10314"
39+
deviceLabel: Aqara Smart Lock U600
40+
vendorId: 0x115F
41+
productId: 0x284A
42+
- id: "4447/10253"
43+
deviceLabel: Aqara Smart Lock J200
44+
vendorId: 0x115F
45+
productId: 0x280D
46+
deviceProfileName: lock-modular
2847
#Eufy
2948
- id: "5427/1"
3049
deviceLabel: eufy Smart Lock E31

drivers/SmartThings/matter-lock/src/new-matter-lock/fingerprints.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ local NEW_MATTER_LOCK_PRODUCTS = {
99
{0x115f, 0x286A}, -- AQARA, U200 US
1010
{0x115f, 0x2805}, -- Aqara Smart Lock J200 Set
1111
{0x115f, 0x280e}, -- AQARA Smart Gate Lock U500
12-
{0x115f, 0x280f}, -- AQARA Smart Rim Lock U500
13-
{0x115f, 0x2810}, -- AQARA Smart Glass Door Lock U500
12+
{0x115F, 0x280F}, -- Aqara Smart Lock U500 Rim
13+
{0x115F, 0x2810}, -- Aqara Smart Lock U500 Glass Door
14+
{0x115F, 0x284A}, -- Aqara Smart Lock U600
15+
{0x115F, 0x280D}, -- Aqara Smart Lock J200
1416
{0x147F, 0x0001}, -- U-tec
1517
{0x147F, 0x0007}, -- ULTRALOQ Bolt Pro Smart Matter Door Lock
1618
{0x147F, 0x0008}, -- Ultraloq, Bolt Smart Matter Door Lock

drivers/SmartThings/matter-sensor/src/sensor_handlers/attribute_handlers.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ function AttributeHandlers.soil_moisture_measurement_limits_handler(driver, devi
8989
local min_val = ib.data.elements and ib.data.elements.min_measured_value and ib.data.elements.min_measured_value.value
9090
local max_val = ib.data.elements and ib.data.elements.max_measured_value and ib.data.elements.max_measured_value.value
9191
if not (min_val and max_val) or (min_val >= max_val) or (min_val < sensor_utils.SOIL_MOISTURE_MIN) or (max_val > sensor_utils.SOIL_MOISTURE_MAX) then
92-
device.log.warn_with({hub_logs = true}, string.format("Device reported invalid soil moisture limits: min=%d, max=%d", min_val, max_val))
92+
device.log.warn_with({hub_logs = true}, string.format("Device reported invalid soil moisture limits: min=%s, max=%s", min_val, max_val))
93+
return
9394
end
9495
sensor_utils.set_field_for_endpoint(device, fields.SOIL_LIMIT_MIN, ib.endpoint_id, min_val)
9596
sensor_utils.set_field_for_endpoint(device, fields.SOIL_LIMIT_MAX, ib.endpoint_id, max_val)

drivers/SmartThings/matter-switch/fingerprints.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,11 @@ matterManufacturer:
557557
vendorId: 0x1339
558558
productId: 0x0056
559559
deviceProfileName: light-color-level
560+
- id: "4921/85"
561+
deviceLabel: Dual Socket Smart Plug
562+
vendorId: 0x1339
563+
productId: 0x0055
564+
deviceProfileName: plug-binary
560565
#Govee
561566
- id: "4999/24740"
562567
deviceLabel: Govee Square Ceiling Light (12 inch)
@@ -4169,6 +4174,12 @@ matterManufacturer:
41694174
vendorId: 0x1392
41704175
productId: 0x0106
41714176
deviceProfileName: plug-power-energy-powerConsumption
4177+
#GIANT LIGHTING
4178+
- id: "5707/1"
4179+
deviceLabel: Floor Lamp
4180+
vendorId: 0x164B
4181+
productId: 0x0001
4182+
deviceProfileName: light-color-level
41724183

41734184

41744185
matterGeneric:

drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ local function rotate_amount_event_helper(device, endpoint_id, num_presses_to_ha
1717
local scroll_direction = switch_utils.tbl_contains(scroll_fields.ENDPOINTS_UP_SCROLL, endpoint_id) and 1 or -1
1818
local scroll_amount = st_utils.clamp_value(scroll_direction * scroll_fields.PER_SCROLL_EVENT_ROTATION * num_presses_to_handle, -100, 100)
1919

20-
device:emit_event_for_endpoint(endpoint_id, capabilities.knob.rotateAmount(scroll_amount, {state_change = true}))
20+
if event_utils.is_valid_scroll_amount(device, scroll_amount) then
21+
device:emit_event_for_endpoint(endpoint_id, capabilities.knob.rotateAmount(scroll_amount, {state_change = true}))
22+
end
2123
end
2224

2325
-- Used by ENDPOINTS_UP_SCROLL and ENDPOINTS_DOWN_SCROLL, not ENDPOINTS_PUSH

drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/event_utils.lua

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
11
-- Copyright © 2026 SmartThings, Inc.
22
-- Licensed under the Apache License, Version 2.0
33

4+
local st_utils = require "st.utils"
45
local clusters = require "st.matter.clusters"
6+
local scroll_fields = require "sub_drivers.ikea_scroll.scroll_utils.fields"
57

68
local IkeaScrollEventUtils = {}
79

10+
11+
function IkeaScrollEventUtils.requeue_clear_scroll_state(device)
12+
-- cancel any previously queued clear state actions to prevent unintended clears
13+
if device:get_field(scroll_fields.CLEAR_STATE_TIMER) then
14+
device.thread:cancel_timer(device:get_field(scroll_fields.CLEAR_STATE_TIMER))
15+
end
16+
local new_timer = device.thread:call_with_delay(scroll_fields.CLEAR_STATE_DELAY_S, function()
17+
device:set_field(scroll_fields.GLOBAL_ROTATE_AMOUNT_STATE, 0)
18+
end)
19+
device:set_field(scroll_fields.CLEAR_STATE_TIMER, new_timer)
20+
end
21+
22+
function IkeaScrollEventUtils.is_valid_scroll_amount(device, scroll_amount)
23+
local global_rotate_amount_state = device:get_field(scroll_fields.GLOBAL_ROTATE_AMOUNT_STATE) or 0
24+
local is_rotate_amount_state_at_bounds = (scroll_amount < 0 and global_rotate_amount_state <= -100) or (scroll_amount > 0 and global_rotate_amount_state >= 100)
25+
if is_rotate_amount_state_at_bounds then
26+
return false
27+
end
28+
29+
device:set_field(scroll_fields.GLOBAL_ROTATE_AMOUNT_STATE, st_utils.clamp_value(global_rotate_amount_state + scroll_amount, -100, 100))
30+
IkeaScrollEventUtils.requeue_clear_scroll_state(device)
31+
return true
32+
end
33+
834
-- inspect all info blocks to find the last one that is not an InitialPress event. We will
935
-- only try to emit a rotateAmount event if the current info block being handled is that last one.
1036
function IkeaScrollEventUtils.is_last_valid_info_block(cur_info_block_event_id, cur_info_block_value, info_blocks)

0 commit comments

Comments
 (0)