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

[BUG] Fan Control Server doesn't set PercentSetting when fan mode is set to "FanModeEnum::kOn" #31213

Open
erwinpan1 opened this issue Jan 2, 2024 · 0 comments
Labels
app-clusters Application cluster work bug Something isn't working hvac needs triage spec Mismatch between spec and implementation

Comments

@erwinpan1
Copy link
Contributor

Reproduction steps

According to Fan Control Cluster's spec , PercentSetting and SpeedSetting should be set to High value when Fan Mode is set to On (or FanModeEnum::kOn).

4.4.6.1.3. On Value
If a client attempts to write a value of On, the attribute SHALL be set to High.

However, in current MatterFanControlClusterServerAttributeChangedCallback, only FanModeEnum::kOff and FanModeEnum::kAuto are handled.

Current codes:

void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAttributePath & attributePath)
{
    switch (attributePath.mAttributeId)
    {
    case FanMode::Id: {
        FanModeEnum mode;
        EmberAfStatus status = FanMode::Get(attributePath.mEndpointId, &mode);
        VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status);

        // Setting the FanMode value to Off SHALL set the values of PercentSetting, PercentCurrent,
        // SpeedSetting, SpeedCurrent attributes to 0 (zero).
        if (mode == FanModeEnum::kOff)
        {
...
        }

        // Setting the attribute value to Auto SHALL set the values of PercentSetting, SpeedSetting (if present)
        // to null.
        if (mode == FanModeEnum::kAuto)
        {
...
        }
        break;
    }

Bug prevalence

Everytime

GitHub hash of the SDK that was being used

6ea3c34

Platform

core

Platform Version(s)

No response

Anything else?

No response

@erwinpan1 erwinpan1 added bug Something isn't working needs triage labels Jan 2, 2024
@bzbarsky-apple bzbarsky-apple added spec Mismatch between spec and implementation app-clusters Application cluster work hvac labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-clusters Application cluster work bug Something isn't working hvac needs triage spec Mismatch between spec and implementation
Projects
Status: Todo
Development

No branches or pull requests

2 participants