diff --git a/components/esp_matter/data_model_provider/clusters/fan_control/integration.cpp b/components/esp_matter/data_model_provider/clusters/fan_control/integration.cpp index 49948d4e0d..f4a968ab9c 100644 --- a/components/esp_matter/data_model_provider/clusters/fan_control/integration.cpp +++ b/components/esp_matter/data_model_provider/clusters/fan_control/integration.cpp @@ -186,6 +186,15 @@ namespace app { namespace Clusters { namespace FanControl { +FanControlCluster * FindClusterOnEndpoint(EndpointId endpointId) +{ + auto it = gServers.find(endpointId); + if (it == gServers.end() || !it->second.server.IsConstructed()) { + return nullptr; + } + return &it->second.server.Cluster(); +} + void SetDefaultDelegate(EndpointId endpointId, Delegate * delegate) { auto it = gServers.find(endpointId);