Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TC_TSTAT_2_2.py #4

Open
wants to merge 1 commit into
base: granbery/thermostat_setpoint_limits_test
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions src/python_testing/TC_TSTAT_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ def steps_TC_TSTAT_2_2(self) -> list[TestStep]:
TestStep("11b", "Test Harness Writes the value below MinSetpointDeadBand"),
TestStep("11c", "Test Harness Writes the min limit of MinSetpointDeadBand"),
TestStep("12", "Test Harness Reads ControlSequenceOfOperation from Server DUT, if TSTAT.S.F01 is true"),
TestStep("13", "Sets OccupiedCoolingSetpoint to default value"),
TestStep("13a", "Sets OccupiedCoolingSetpoint to default value"),
TestStep("13b", "Sets SetpointRaiseLower set to Heat (0x00), and the amount set to 0xE2 (-30 units = -3 degrees)."),
TestStep("14", "Sets OccupiedHeatingSetpoint to default value"),
TestStep("15", "Test Harness Sends SetpointRaise Command Cool Only"),
TestStep("15a", "Test Harness Sends SetpointRaise Command Cool Only"),
TestStep("15b", "Sets SetpointRaiseLower set to Cool (0x01), and the amount set to 0xE2 (-30 units = -3 degrees)."),
TestStep("16", "Sets OccupiedCoolingSetpoint to default value"),
TestStep("17", "Sets OccupiedCoolingSetpoint to default value"),
TestStep("18", "Sets OccupiedCoolingSetpoint to default value"),
Expand Down Expand Up @@ -674,7 +676,7 @@ async def test_TC_TSTAT_2_2(self):
if val != ControlSequenceOfOperation:
asserts.assert_equal(val, 4)

self.step("13")
self.step("13a")

if self.pics_guard(hasCoolingFeature):
# Sets OccupiedCoolingSetpoint to default value
Expand All @@ -691,6 +693,13 @@ async def test_TC_TSTAT_2_2(self):
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint)
asserts.assert_equal(val, OccupiedHeatingSetpointValue - 30 * 10)

self.step("13b")

if self.pics_guard(not hasHeatingFeature):
# Sends SetpointRaise Command Heat Only
await self.send_single_cmd(cmd=Clusters.Objects.Thermostat.Commands.SetpointRaiseLower(mode=Clusters.Objects.Thermostat.Enums.SetpointRaiseLowerModeEnum.kHeat, amount=-30), endpoint=endpoint)
asserts.assert_equal(status, Status.InvalidCommand)

self.step("14")

if self.pics_guard(hasHeatingFeature):
Expand All @@ -704,7 +713,7 @@ async def test_TC_TSTAT_2_2(self):
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint)
asserts.assert_equal(val, OccupiedHeatingSetpointValue + 30 * 10)

self.step("15")
self.step("15a")

if self.pics_guard(hasCoolingFeature):
# Test Harness Sends SetpointRaise Command Cool Only
Expand All @@ -714,6 +723,13 @@ async def test_TC_TSTAT_2_2(self):
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedCoolingSetpoint)
asserts.assert_equal(val, OccupiedCoolingSetpointValue - 30 * 10)

self.step("15b")

if self.pics_guard(not hasCoolingFeature):
# Test Harness Sends SetpointRaise Command Cool Only
await self.send_single_cmd(cmd=Clusters.Objects.Thermostat.Commands.SetpointRaiseLower(mode=Clusters.Objects.Thermostat.Enums.SetpointRaiseLowerModeEnum.kCool, amount=-30), endpoint=endpoint)
asserts.assert_equal(status, Status.InvalidCommand)

self.step("16")

if self.pics_guard(hasCoolingFeature):
Expand Down
Loading