Skip to content

Commit

Permalink
[HVAC] Set thermostat delegate in thermostat app (#35230)
Browse files Browse the repository at this point in the history
  • Loading branch information
hasty authored Aug 27, 2024
1 parent 6d65c0a commit c50b740
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/thermostat/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/thermostat-server/thermostat-server.h>

#include "thermostat-delegate-impl.h"

using namespace chip;
using namespace chip::app;
Expand Down Expand Up @@ -78,3 +81,12 @@ int main(int argc, char * argv[])
ChipLinuxAppMainLoop();
return 0;
}

using namespace chip::app::Clusters::Thermostat;
void emberAfThermostatClusterInitCallback(EndpointId endpoint)
{
// Register the delegate for the Thermostat
auto & delegate = ThermostatDelegate::GetInstance();

SetDefaultDelegate(endpoint, &delegate);
}

0 comments on commit c50b740

Please sign in to comment.