@@ -248,7 +248,12 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
248248
249249namespace on_off_light {
250250
251- using config_t = on_off_config;
251+ typedef struct config : on_off_config {
252+ config () {
253+ /* For lighting product, the default identify type should be 0x01: LightOutput*/
254+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kLightOutput );
255+ }
256+ } config_t ;
252257
253258uint32_t get_device_type_id ();
254259uint8_t get_device_type_version ();
@@ -291,7 +296,11 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
291296
292297namespace on_off_switch {
293298
294- using config_t = app_client_config;
299+ typedef struct config : app_client_config {
300+ config () {
301+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
302+ }
303+ } config_t ;
295304
296305uint32_t get_device_type_id ();
297306uint8_t get_device_type_version ();
@@ -301,7 +310,11 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
301310
302311namespace dimmer_switch {
303312
304- using config_t = app_client_config;
313+ typedef struct config : app_client_config {
314+ config () {
315+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
316+ }
317+ } config_t ;
305318
306319uint32_t get_device_type_id ();
307320uint8_t get_device_type_version ();
@@ -311,7 +324,11 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
311324
312325namespace color_dimmer_switch {
313326
314- using config_t = app_client_config;
327+ typedef struct config : app_client_config {
328+ config () {
329+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
330+ }
331+ } config_t ;
315332
316333uint32_t get_device_type_id ();
317334uint8_t get_device_type_version ();
@@ -321,6 +338,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
321338
322339namespace generic_switch {
323340typedef struct config : app_base_config {
341+ config () {
342+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
343+ }
324344 cluster::switch_cluster::config_t switch_cluster;
325345} config_t ;
326346
@@ -332,7 +352,11 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
332352
333353namespace on_off_plugin_unit {
334354
335- using config_t = on_off_config;
355+ typedef struct config : on_off_config {
356+ config () {
357+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
358+ }
359+ } config_t ;
336360
337361uint32_t get_device_type_id ();
338362uint8_t get_device_type_version ();
@@ -353,6 +377,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
353377
354378namespace fan {
355379typedef struct config : app_with_group_config {
380+ config () {
381+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator );
382+ }
356383 cluster::fan_control::config_t fan_control;
357384} config_t ;
358385
@@ -364,6 +391,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
364391
365392namespace thermostat {
366393typedef struct config : app_with_group_config {
394+ config () {
395+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
396+ }
367397 cluster::scenes_management::config_t scenes_management;
368398 cluster::thermostat::config_t thermostat;
369399} config_t ;
@@ -376,6 +406,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
376406
377407namespace air_quality_sensor {
378408typedef struct config : app_base_config {
409+ config () {
410+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
411+ }
379412 cluster::air_quality::config_t air_quality;
380413} config_t ;
381414
@@ -387,6 +420,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
387420
388421namespace air_purifier {
389422typedef struct config : app_base_config {
423+ config () {
424+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator );
425+ }
390426 cluster::fan_control::config_t fan_control;
391427} config_t ;
392428
@@ -425,6 +461,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
425461
426462namespace smoke_co_alarm {
427463typedef struct config : app_base_config {
464+ config () {
465+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kAudibleBeep );
466+ }
428467 cluster::smoke_co_alarm::config_t smoke_co_alarm;
429468} config_t ;
430469uint32_t get_device_type_id ();
@@ -469,6 +508,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
469508
470509namespace door_lock {
471510typedef struct config : app_base_config {
511+ config () {
512+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kAudibleBeep );
513+ }
472514 cluster::door_lock::config_t door_lock;
473515} config_t ;
474516
@@ -482,7 +524,9 @@ namespace window_covering_device {
482524typedef struct config : app_with_group_config {
483525 cluster::scenes_management::config_t scenes_management;
484526 cluster::window_covering::config_t window_covering;
485- config (uint8_t end_product_type = 0 ) : window_covering(end_product_type) {}
527+ config (uint8_t end_product_type = 0 ) : window_covering(end_product_type) {
528+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator );
529+ }
486530} config_t ;
487531
488532uint32_t get_device_type_id ();
@@ -493,6 +537,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
493537
494538namespace temperature_sensor {
495539typedef struct config : app_base_config {
540+ config () {
541+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
542+ }
496543 cluster::temperature_measurement::config_t temperature_measurement;
497544} config_t ;
498545
@@ -504,6 +551,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
504551
505552namespace humidity_sensor {
506553typedef struct config : app_base_config {
554+ config () {
555+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
556+ }
507557 cluster::relative_humidity_measurement::config_t relative_humidity_measurement;
508558} config_t ;
509559
@@ -515,6 +565,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
515565
516566namespace occupancy_sensor {
517567typedef struct config : app_base_config {
568+ config () {
569+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kAudibleBeep );
570+ }
518571 cluster::occupancy_sensing::config_t occupancy_sensing;
519572} config_t ;
520573
@@ -525,7 +578,12 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
525578} /* occupancy_sensor */
526579
527580namespace contact_sensor {
528- using config_t = app_with_bool_state_config;
581+
582+ typedef struct config : app_with_bool_state_config {
583+ config () {
584+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
585+ }
586+ } config_t ;
529587
530588uint32_t get_device_type_id ();
531589uint8_t get_device_type_version ();
@@ -535,6 +593,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
535593
536594namespace light_sensor {
537595typedef struct config : app_base_config {
596+ config () {
597+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
598+ }
538599 cluster::illuminance_measurement::config_t illuminance_measurement;
539600} config_t ;
540601
@@ -546,6 +607,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
546607
547608namespace pressure_sensor {
548609typedef struct config : app_base_config {
610+ config () {
611+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
612+ }
549613 cluster::pressure_measurement::config_t pressure_measurement;
550614} config_t ;
551615
@@ -557,6 +621,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
557621
558622namespace flow_sensor {
559623typedef struct config : app_base_config {
624+ config () {
625+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
626+ }
560627 cluster::flow_measurement::config_t flow_measurement;
561628} config_t ;
562629
@@ -574,7 +641,9 @@ typedef struct config : app_base_config {
574641 nullable<int16_t > max_pressure = nullable<int16_t >(),
575642 nullable<uint16_t > max_speed = nullable<uint16_t >(),
576643 nullable<uint16_t > max_flow = nullable<uint16_t >()
577- ) : pump_configuration_and_control(max_pressure, max_speed, max_flow) {}
644+ ) : pump_configuration_and_control(max_pressure, max_speed, max_flow) {
645+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator );
646+ }
578647} config_t ;
579648
580649uint32_t get_device_type_id ();
@@ -585,6 +654,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
585654
586655namespace pump_controller {
587656typedef struct config : app_client_config {
657+ config () {
658+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
659+ }
588660 cluster::on_off::config_t on_off;
589661 cluster::pump_configuration_and_control::config_t pump_configuration_and_control;
590662} config_t ;
@@ -609,6 +681,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
609681
610682namespace room_air_conditioner {
611683typedef struct config : app_base_config {
684+ config () {
685+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator );
686+ }
612687 cluster::on_off::config_t on_off;
613688 cluster::thermostat::config_t thermostat;
614689} config_t ;
@@ -655,6 +730,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
655730
656731namespace robotic_vacuum_cleaner {
657732typedef struct config : app_base_config {
733+ config () {
734+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator );
735+ }
658736 cluster::rvc_run_mode::config_t rvc_run_mode;
659737 cluster::rvc_operational_state::config_t rvc_operational_state;
660738} config_t ;
@@ -666,7 +744,12 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
666744} /* * robotic_vacuum_cleaner **/
667745
668746namespace water_leak_detector {
669- using config_t = app_with_bool_state_config;
747+
748+ typedef struct config : app_with_bool_state_config {
749+ config () {
750+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
751+ }
752+ } config_t ;
670753
671754uint32_t get_device_type_id ();
672755uint8_t get_device_type_version ();
@@ -676,7 +759,11 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
676759
677760namespace water_freeze_detector {
678761
679- using config_t = app_with_bool_state_config;
762+ typedef struct config : app_with_bool_state_config {
763+ config () {
764+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
765+ }
766+ } config_t ;
680767
681768uint32_t get_device_type_id ();
682769uint8_t get_device_type_version ();
@@ -686,7 +773,11 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
686773
687774namespace rain_sensor {
688775
689- using config_t = app_with_bool_state_config;
776+ typedef struct config : app_with_bool_state_config {
777+ config () {
778+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator );
779+ }
780+ } config_t ;
690781
691782uint32_t get_device_type_id ();
692783uint8_t get_device_type_version ();
@@ -772,6 +863,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
772863namespace water_valve {
773864typedef struct config : app_base_config {
774865 cluster::valve_configuration_and_control::config_t valve_configuration_and_control;
866+ config () {
867+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator );
868+ }
775869} config_t ;
776870
777871uint32_t get_device_type_id ();
@@ -819,7 +913,12 @@ esp_err_t add(endpoint_t *endpoint, config_t *config);
819913} /* secondary_network_interface */
820914
821915namespace mounted_on_off_control {
822- using config_t = on_off_config;
916+
917+ typedef struct config : on_off_config {
918+ config () {
919+ identify.identify_type = chip::to_underlying (chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator );
920+ }
921+ } config_t ;
823922
824923uint32_t get_device_type_id ();
825924uint8_t get_device_type_version ();
0 commit comments