Skip to content

Commit ee03924

Browse files
hastyPeterC1965
authored andcommitted
[HVAC] Set thermostat delegate in thermostat app (project-chip#35230)
1 parent 399a09c commit ee03924

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/thermostat/linux/main.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
#include <app-common/zap-generated/ids/Clusters.h>
2222
#include <app/CommandHandler.h>
2323
#include <app/clusters/identify-server/identify-server.h>
24+
#include <app/clusters/thermostat-server/thermostat-server.h>
25+
26+
#include "thermostat-delegate-impl.h"
2427

2528
using namespace chip;
2629
using namespace chip::app;
@@ -78,3 +81,12 @@ int main(int argc, char * argv[])
7881
ChipLinuxAppMainLoop();
7982
return 0;
8083
}
84+
85+
using namespace chip::app::Clusters::Thermostat;
86+
void emberAfThermostatClusterInitCallback(EndpointId endpoint)
87+
{
88+
// Register the delegate for the Thermostat
89+
auto & delegate = ThermostatDelegate::GetInstance();
90+
91+
SetDefaultDelegate(endpoint, &delegate);
92+
}

0 commit comments

Comments
 (0)