mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
Merge branch 'fix/features' into 'main'
esp-matter/features: Add features as config in the cluster structure. See merge request app-frameworks/esp-matter!1002
This commit is contained in:
@@ -214,13 +214,17 @@ extern "C" void app_main()
|
||||
|
||||
extended_color_light::config_t light_config;
|
||||
light_config.on_off.on_off = DEFAULT_POWER;
|
||||
light_config.on_off.lighting.start_up_on_off = nullptr;
|
||||
light_config.on_off.features.lighting.start_up_on_off = nullptr;
|
||||
light_config.level_control.current_level = DEFAULT_BRIGHTNESS;
|
||||
light_config.level_control.on_level = DEFAULT_BRIGHTNESS;
|
||||
light_config.level_control.lighting.start_up_current_level = DEFAULT_BRIGHTNESS;
|
||||
light_config.level_control.features.lighting.start_up_current_level = DEFAULT_BRIGHTNESS;
|
||||
light_config.color_control.color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature;
|
||||
light_config.color_control.enhanced_color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature;
|
||||
light_config.color_control.color_temperature.startup_color_temperature_mireds = nullptr;
|
||||
light_config.color_control.features.color_temperature.startup_color_temperature_mireds = nullptr;
|
||||
|
||||
light_config.on_off.feature_flags = cluster::on_off::feature::lighting::get_id();
|
||||
light_config.level_control.feature_flags = cluster::level_control::feature::lighting::get_id();
|
||||
light_config.color_control.feature_flags = cluster::color_control::feature::color_temperature::get_id();
|
||||
|
||||
// endpoint handles can be used to add/modify clusters.
|
||||
endpoint_t *endpoint = extended_color_light::create(node, &light_config, ENDPOINT_FLAG_NONE, light_handle);
|
||||
|
||||
Reference in New Issue
Block a user