Skip to content

Commit 5b66a65

Browse files
committed
Restore setpoints to original values at end of test
1 parent dfca8a8 commit 5b66a65

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/python_testing/TC_TSTAT_2_2.py

+16
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,22 @@ async def test_TC_TSTAT_2_2(self):
767767
val = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.OccupiedHeatingSetpoint)
768768
asserts.assert_equal(val, OccupiedHeatingSetpointValue + 30 * 10)
769769

770+
if self.pics_guard(hasCoolingFeature):
771+
# Restores OccupiedCoolingSetpoint to original value
772+
await self.write_single_attribute(attribute_value=cluster.Attributes.OccupiedCoolingSetpoint(OccupiedCoolingSetpointValue), endpoint_id=endpoint)
773+
774+
if self.pics_guard(hasHeatingFeature):
775+
# Restores OccupiedHeatingSetpoint to original value
776+
await self.write_single_attribute(attribute_value=cluster.Attributes.OccupiedHeatingSetpoint(OccupiedHeatingSetpointValue), endpoint_id=endpoint)
777+
778+
if self.pics_guard(hasOccupancyFeature and hasCoolingFeature):
779+
# Restores UnoccupiedCoolingSetpoint to original value
780+
await self.write_single_attribute(attribute_value=cluster.Attributes.UnoccupiedCoolingSetpoint(UnoccupiedCoolingSetpointValue), endpoint_id=endpoint)
781+
782+
if self.pics_guard(hasOccupancyFeature and hasHeatingFeature):
783+
# Restores UnoccupiedHeatingSetpoint to original value
784+
await self.write_single_attribute(attribute_value=cluster.Attributes.UnoccupiedHeatingSetpoint(UnoccupiedHeatingSetpointValue), endpoint_id=endpoint)
785+
770786

771787
if __name__ == "__main__":
772788
default_matter_test_main()

0 commit comments

Comments
 (0)