Skip to content

[TC-FAN] Update Python test to validate lowestOff fallback value in FanControl Step command #779

@Elen777300

Description

@Elen777300

Summary Title:

Update Python test to validate lowestOff fallback value in FanControl Step command

Description:

Following up on a PR review comment from @soares-sergio, it was identified that the fallback value for lowestOff in the FanControl cluster's Step command should be true according to the spec, rather than false.
Link to the comment

Original implementation:

bool lowestOffValue = commandData.lowestOff.ValueOr(false);
// Suggested/Spec-compliant change:
bool lowestOffValue = commandData.lowestOff.ValueOr(true);

While we have existing Python tests for the FanControl cluster, they do not currently validate this specific omitted-argument fallback behavior. This issue is to track the necessary update to the existing test scripts to ensure this spec requirement is explicitly covered and not missed in future regressions.

Steps to reproduce:

Locate the existing Python test script that covers the FanControl cluster's Step command within src/python_testing/ (Target files to check: TC_FAN_3_1.py, TC_FAN_3_2.py, TC_FAN_3_3.py, TC_FAN_3_4.py, TC_FAN_3_5.py, or TC_FAN_4_1.py).

Implement a new test step/case that sends a Step command where the lowestOff field is intentionally omitted from the payload.

Assert that the device processes the command using the default fallback value of true, exactly matching the spec requirements.

Logs:

N/A - This is a test coverage enhancement request originating from a code review.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions