From 15445287f5289f807b3c8d0239dd3208079fe2c4 Mon Sep 17 00:00:00 2001 From: Erwin Pan Date: Wed, 6 Dec 2023 21:36:25 +0800 Subject: [PATCH] Fix AirQualitySensor hardcoded endpointId as 1 (#30840) --- examples/chef/common/chef-air-quality.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/chef/common/chef-air-quality.cpp b/examples/chef/common/chef-air-quality.cpp index f74f4ea546753f..3385c9e455e339 100644 --- a/examples/chef/common/chef-air-quality.cpp +++ b/examples/chef/common/chef-air-quality.cpp @@ -35,9 +35,9 @@ static std::map gAirQualityClusterInstance{}; void emberAfAirQualityClusterInitCallback(chip::EndpointId endpointId) { - Instance * clusterInstance = new Instance(1, airQualityFeatures); + Instance * clusterInstance = new Instance(endpointId, airQualityFeatures); clusterInstance->Init(); - gAirQualityClusterInstance[1] = clusterInstance; + gAirQualityClusterInstance[endpointId] = clusterInstance; } EmberAfStatus chefAirQualityWriteCallback(EndpointId endpoint, ClusterId clusterId,