Skip to content

Commit 881effe

Browse files
Fix new test cases for api v10
1 parent 37d92a4 commit 881effe

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

drivers/SmartThings/matter-thermostat/src/test/test_matter_thermo_setpoint_limits.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -440,18 +440,18 @@ test.register_coroutine_test("Heating setpoint capability cached as Fahrenheit v
440440

441441
test.register_coroutine_test("Cooling setpoint capability cached as Fahrenheit value",
442442
function()
443-
mock_device.wrapped_device.state_cache.main = {
444-
[capabilities.thermostatCoolingSetpoint.ID] = {
445-
[capabilities.thermostatCoolingSetpoint.coolingSetpoint.NAME] = { unit = "F", value = 46.67 }
443+
mock_device.wrapped_device.state_cache.main = {
444+
[capabilities.thermostatCoolingSetpoint.ID] = {
445+
[capabilities.thermostatCoolingSetpoint.coolingSetpoint.NAME] = { unit = "F", value = 46.67 }
446+
}
446447
}
447-
}
448-
test.socket.capability:__queue_receive({
449-
mock_device.id,
450-
{ capability = "thermostatHeatingSetpoint", component = "main", command = "setHeatingSetpoint", args = { 9 } }
451-
})
452-
test.socket.capability:__expect_send(
453-
mock_device:generate_test_message("main", capabilities.thermostatHeatingSetpoint.heatingSetpoint({ value = 5.00, unit = "C" }, {state_change = true }))
454-
)
448+
test.socket.capability:__queue_receive({
449+
mock_device.id,
450+
{ capability = "thermostatHeatingSetpoint", component = "main", command = "setHeatingSetpoint", args = { 9 } }
451+
})
452+
test.socket.capability:__expect_send(
453+
mock_device:generate_test_message("main", capabilities.thermostatHeatingSetpoint.heatingSetpoint({ value = 5.00, unit = "C" }, {state_change = true }))
454+
)
455455
end
456456
)
457457

drivers/SmartThings/matter-thermostat/src/test/test_matter_thermostat.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ local version = require "version"
2121

2222
if version.api < 11 then
2323
clusters.Thermostat.types.SystemModeEnum = clusters.Thermostat.types.ThermostatSystemMode
24+
clusters.Thermostat.types.ControlSequenceOfOperationEnum = clusters.Thermostat.types.ThermostatControlSequence
2425
end
2526

2627
local mock_device = test.mock_device.build_test_matter_device({

0 commit comments

Comments
 (0)