diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only-nostate-nobattery.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only-nostate-nobattery.yml new file mode 100644 index 0000000000..7559f7b657 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only-nostate-nobattery.yml @@ -0,0 +1,20 @@ +name: thermostat-fan-speed-cooling-only-nostate-nobattery +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only-nostate.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only-nostate.yml new file mode 100644 index 0000000000..02387dc42e --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only-nostate.yml @@ -0,0 +1,22 @@ +name: thermostat-fan-speed-cooling-only-nostate +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only.yml new file mode 100644 index 0000000000..58645889ac --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-cooling-only.yml @@ -0,0 +1,24 @@ +name: thermostat-fan-speed-cooling-only +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: thermostatOperatingState + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only-nostate-nobattery.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only-nostate-nobattery.yml new file mode 100644 index 0000000000..6181610eae --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only-nostate-nobattery.yml @@ -0,0 +1,20 @@ +name: thermostat-fan-speed-heating-only-nostate-nobattery +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only-nostate.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only-nostate.yml new file mode 100644 index 0000000000..01a6cd30dc --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only-nostate.yml @@ -0,0 +1,22 @@ +name: thermostat-fan-speed-heating-only-nostate +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only.yml new file mode 100644 index 0000000000..fa330c92a3 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-heating-only.yml @@ -0,0 +1,24 @@ +name: thermostat-fan-speed-heating-only +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: thermostatOperatingState + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-nostate-nobattery.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-nostate-nobattery.yml new file mode 100644 index 0000000000..ff6645a1dd --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-nostate-nobattery.yml @@ -0,0 +1,22 @@ +name: thermostat-fan-speed-nostate-nobattery +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-nostate.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-nostate.yml new file mode 100644 index 0000000000..a183ee91c4 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed-nostate.yml @@ -0,0 +1,24 @@ +name: thermostat-fan-speed-nostate +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed.yml new file mode 100644 index 0000000000..71603e65d0 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-fan-speed.yml @@ -0,0 +1,26 @@ +name: thermostat-fan-speed +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: thermostatOperatingState + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only-nostate-nobattery.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only-nostate-nobattery.yml new file mode 100644 index 0000000000..9210cc58a2 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only-nostate-nobattery.yml @@ -0,0 +1,22 @@ +name: thermostat-humidity-fan-speed-cooling-only-nostate-nobattery +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only-nostate.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only-nostate.yml new file mode 100644 index 0000000000..8f63dacc72 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only-nostate.yml @@ -0,0 +1,24 @@ +name: thermostat-humidity-fan-speed-cooling-only-nostate +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only.yml new file mode 100644 index 0000000000..9e5d2f39fa --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-cooling-only.yml @@ -0,0 +1,26 @@ +name: thermostat-humidity-fan-speed-cooling-only +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: thermostatOperatingState + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only-nostate-nobattery.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only-nostate-nobattery.yml new file mode 100644 index 0000000000..e82a44ae3a --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only-nostate-nobattery.yml @@ -0,0 +1,22 @@ +name: thermostat-humidity-fan-speed-heating-only-nostate-nobattery +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only-nostate.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only-nostate.yml new file mode 100644 index 0000000000..1cda8b21d7 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only-nostate.yml @@ -0,0 +1,24 @@ +name: thermostat-humidity-fan-speed-heating-only-nostate +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only.yml new file mode 100644 index 0000000000..b492742a23 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-heating-only.yml @@ -0,0 +1,26 @@ +name: thermostat-humidity-fan-speed-heating-only +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: thermostatOperatingState + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-nostate-nobattery.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-nostate-nobattery.yml new file mode 100644 index 0000000000..2d457b9eef --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-nostate-nobattery.yml @@ -0,0 +1,24 @@ +name: thermostat-humidity-fan-speed-nostate-nobattery +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-nostate.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-nostate.yml new file mode 100644 index 0000000000..7cc4718e78 --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed-nostate.yml @@ -0,0 +1,26 @@ +name: thermostat-humidity-fan-speed-nostate +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed.yml b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed.yml new file mode 100644 index 0000000000..c80a0a741f --- /dev/null +++ b/drivers/SmartThings/matter-thermostat/profiles/thermostat-humidity-fan-speed.yml @@ -0,0 +1,28 @@ +name: thermostat-humidity-fan-speed +components: +- id: main + capabilities: + - id: fanSpeedPercent + version: 1 + - id: temperatureMeasurement + version: 1 + - id: thermostatMode + version: 1 + - id: thermostatFanMode + version: 1 + - id: thermostatHeatingSetpoint + version: 1 + - id: thermostatCoolingSetpoint + version: 1 + - id: thermostatOperatingState + version: 1 + - id: relativeHumidityMeasurement + version: 1 + - id: battery + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Thermostat diff --git a/drivers/SmartThings/matter-thermostat/src/init.lua b/drivers/SmartThings/matter-thermostat/src/init.lua index 5571326297..f5cbc24b63 100644 --- a/drivers/SmartThings/matter-thermostat/src/init.lua +++ b/drivers/SmartThings/matter-thermostat/src/init.lua @@ -78,6 +78,7 @@ local ROCK_MODE_MAP = { local RAC_DEVICE_TYPE_ID = 0x0072 local AP_DEVICE_TYPE_ID = 0x002D local FAN_DEVICE_TYPE_ID = 0x002B +local TMST_DEVICE_TYPE_ID = 0x0301 local MIN_ALLOWED_PERCENT_VALUE = 0 local MAX_ALLOWED_PERCENT_VALUE = 100 @@ -313,6 +314,8 @@ local function get_device_type(driver, device) return AP_DEVICE_TYPE_ID elseif dt.device_type_id == FAN_DEVICE_TYPE_ID then return FAN_DEVICE_TYPE_ID + elseif dt.device_type_id == TMST_DEVICE_TYPE_ID then + return TMST_DEVICE_TYPE_ID end end end @@ -440,6 +443,7 @@ local function do_configure(driver, device) local thermostat_eps = device:get_endpoints(clusters.Thermostat.ID) local humidity_eps = device:get_endpoints(clusters.RelativeHumidityMeasurement.ID) local battery_eps = device:get_endpoints(clusters.PowerSource.ID, {feature_bitmap = clusters.PowerSource.types.PowerSourceFeature.BATTERY}) + local fan_speed_eps = device:get_endpoints(clusters.FanControl.ID, {feature_bitmap = clusters.FanControl.types.Feature.MULTI_SPEED}) local device_type = get_device_type(driver, device) local profile_name if device_type == RAC_DEVICE_TYPE_ID then @@ -503,7 +507,7 @@ local function do_configure(driver, device) end profile_name = profile_name .. create_air_quality_sensor_profile(device) - elseif #thermostat_eps > 0 then + elseif #thermostat_eps > 0 or device_type == TMST_DEVICE_TYPE_ID then profile_name = "thermostat" if #humidity_eps > 0 then @@ -515,6 +519,10 @@ local function do_configure(driver, device) if fan_name ~= "" then profile_name = profile_name .. "-fan" end + + if #fan_speed_eps > 0 then + profile_name = profile_name .. "-speed" + end local thermostat_modes = create_thermostat_modes_profile(device) if thermostat_modes == "No Heating nor Cooling Support" then