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

Removed level control callback in OnOff Cluster #12507

Merged
Merged
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
18 changes: 0 additions & 18 deletions src/app/clusters/on-off-server/on-off-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,30 +151,12 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm
emberAfOnOffClusterPrintln("ERR: writing on/off %x", status);
return status;
}

#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL
// If initiatedByLevelChange is false, then we assume that the level change
// ZCL stuff has not happened and we do it here
if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id))
{
emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue);
}
#endif // EMBER_AF_PLUGIN_LEVEL_CONTROL
}
else // Set Off
{
emberAfOnOffClusterPrintln("Off Command - OnTime : 0");
Attributes::OnTime::Set(endpoint, 0); // Reset onTime

#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL
// If initiatedByLevelChange is false, then we assume that the level change
// ZCL stuff has not happened and we do it here
if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id))
{
emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue);
}
#endif // EMBER_AF_PLUGIN_LEVEL_CONTROL

// write the new on/off value
status = Attributes::OnOff::Set(endpoint, newValue);
if (status != EMBER_ZCL_STATUS_SUCCESS)
Expand Down