Skip to content

Commit e27f1c6

Browse files
committed
Added support for Bosch matter motion sensor
1 parent 37691d5 commit e27f1c6

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

drivers/SmartThings/matter-switch/fingerprints.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ matterManufacturer:
137137
vendorId: 0x1209
138138
productId: 0x3016
139139
deviceProfileName: plug-power-energy-powerConsumption
140+
- id: 4617/12307
141+
deviceLabel: "Motion Detector II [+M]"
142+
vendorId: 0x1209
143+
productId: 0x3013
144+
deviceProfileName: light-level-motion-illuminance-battery-temp
140145
#Chengdu
141146
- id: "5218/8197"
142147
deviceLabel: Magic Cube DS001
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: light-level-motion-illuminance-battery-temp
2+
components:
3+
- id: main
4+
capabilities:
5+
- id: motionSensor
6+
version: 1
7+
- id: temperatureMeasurement
8+
version: 1
9+
- id: illuminanceMeasurement
10+
version: 1
11+
- id: battery
12+
version: 1
13+
- id: firmwareUpdate
14+
version: 1
15+
- id: refresh
16+
version: 1
17+
- id: switch
18+
version: 1
19+
- id: switchLevel
20+
version: 1
21+
config:
22+
values:
23+
- key: "level.value"
24+
range: [1, 100]
25+
categories:
26+
- name: MotionSensor
27+
preferences:
28+
- preferenceId: tempOffset
29+
explicit: true

drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ function DeviceConfiguration.match_profile(driver, device)
193193
updated_profile = "light-color-level-fan"
194194
elseif generic_profile("light-level") and #device:get_endpoints(clusters.OccupancySensing.ID) > 0 then
195195
updated_profile = "light-level-motion"
196+
if switch_utils.check_switch_category_vendor_overrides(device) then
197+
updated_profile = fields.vendor_overrides[device.manufacturer_info.vendor_id][device.manufacturer_info.product_id].target_profile
198+
end
196199
elseif generic_profile("light-level-colorTemperature") or generic_profile("light-color-level") then
197200
-- ignore attempts to dynamically profile light-level-colorTemperature and light-color-level devices for now, since
198201
-- these may lose fingerprinted Kelvin ranges when dynamically profiled.

drivers/SmartThings/matter-switch/src/switch_utils/fields.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ SwitchFields.vendor_overrides = {
117117
[0x1006] = { ignore_combo_switch_button = true, target_profile = "light-level-power-energy-powerConsumption", ep_id = 1 }, -- 3 Buttons(Generic Switch), 1 Channels(Dimmable Light)
118118
[0x100A] = { ignore_combo_switch_button = true, target_profile = "light-level-power-energy-powerConsumption", ep_id = 1 }, -- 1 Buttons(Generic Switch), 1 Channels(Dimmable Light)
119119
[0x2004] = { is_climate_sensor_w100 = true }, -- Climate Sensor W100, requires unique profile
120+
},
121+
[0x1209] = { -- Bosch
122+
[0x3013] = {target_profile = "light-level-motion-illuminance-battery-temp"}
120123
}
121124
}
122125

0 commit comments

Comments
 (0)