diff --git a/examples/thermostat/linux/main.cpp b/examples/thermostat/linux/main.cpp index b9f82696e8ce79..3983d2b37dfb90 100644 --- a/examples/thermostat/linux/main.cpp +++ b/examples/thermostat/linux/main.cpp @@ -21,6 +21,9 @@ #include #include #include +#include + +#include "thermostat-delegate-impl.h" using namespace chip; using namespace chip::app; @@ -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); +}