Skip to content

Commit

Permalink
Removed level control callbacks (#12507)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs authored and pull[bot] committed Jul 30, 2022
1 parent 1253278 commit 9811765
Showing 1 changed file with 0 additions and 18 deletions.
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

0 comments on commit 9811765

Please sign in to comment.