diff --git a/examples/all_device_types_app/main/app_priv.h b/examples/all_device_types_app/main/app_priv.h index 3165e7217..4566e0000 100644 --- a/examples/all_device_types_app/main/app_priv.h +++ b/examples/all_device_types_app/main/app_priv.h @@ -141,7 +141,9 @@ esp_err_t app_driver_init(); class FanDelegateImpl:public chip::app::Clusters::FanControl::Delegate { public: - FanDelegateImpl(uint16_t aEndpoint):Delegate(aEndpoint){} + // Constructor to match the base class design, however endpoint_id set here is not being using at all. + // FanControlDelegateInitCB sets the delegate on correct endpoint while initialization. + FanDelegateImpl():Delegate(chip::kInvalidEndpointId) {} chip::Protocols::InteractionModel::Status HandleStep(chip::app::Clusters::FanControl::StepDirectionEnum aDirection, bool aWrap, bool aLowestOff); }; diff --git a/examples/all_device_types_app/main/esp_matter_console_helpers.cpp b/examples/all_device_types_app/main/esp_matter_console_helpers.cpp index 81cac67ae..82b5b5121 100644 --- a/examples/all_device_types_app/main/esp_matter_console_helpers.cpp +++ b/examples/all_device_types_app/main/esp_matter_console_helpers.cpp @@ -230,7 +230,7 @@ int create(uint8_t device_type_index) case ESP_MATTER_FAN: { esp_matter::endpoint::fan::config_t fan_config; #if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S3 - static FanDelegateImpl fan_delegate(app_endpoint_id); + static FanDelegateImpl fan_delegate; fan_config.fan_control.delegate = &fan_delegate; #endif endpoint = esp_matter::endpoint::fan::create(node, &fan_config, ENDPOINT_FLAG_NONE, NULL);