File tree Expand file tree Collapse file tree 4 files changed +27
-1
lines changed
components/led/lightbulb_driver Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 11# ChangeLog
22
3+ ## v1.9.0 - 2025-08-11
4+
5+ ### Improve:
6+
7+ - Add API for get power limit
8+
39## v1.8.3 - 2025-06-19
410
511### Bug Fix:
Original file line number Diff line number Diff line change 1- version : " 1.8.3 "
1+ version : " 1.9.0 "
22description : Provide multiple dimming driver solutions to easily build lightbulb applications
33url : https://github.com/espressif/esp-iot-solution/tree/master/components/led/lightbulb_driver
44dependencies :
Original file line number Diff line number Diff line change @@ -680,6 +680,14 @@ bool lightbulb_get_switch(void);
680680 */
681681lightbulb_works_mode_t lightbulb_get_mode (void );
682682
683+ /**
684+ * @brief Get the power limit of the lightbulb.
685+ *
686+ * @param power_limit A pointer to a `lightbulb_power_limit_t` structure where the power limit details will be stored.
687+ * @return esp_err_t An error code indicating the success or failure of the operation.
688+ */
689+ esp_err_t lightbulb_get_power_limit (lightbulb_power_limit_t * power_limit );
690+
683691/**
684692 * @brief Get all the status details of the lightbulb.
685693 *
Original file line number Diff line number Diff line change @@ -1939,6 +1939,18 @@ lightbulb_works_mode_t lightbulb_get_mode(void)
19391939 return result ;
19401940}
19411941
1942+ esp_err_t lightbulb_get_power_limit (lightbulb_power_limit_t * power_limit )
1943+ {
1944+ LIGHTBULB_CHECK (power_limit , "power_limit is null" , return ESP_FAIL );
1945+ LIGHTBULB_CHECK (s_lb_obj , "not init" , return ESP_ERR_INVALID_ARG );
1946+
1947+ LB_MUTEX_TAKE (portMAX_DELAY );
1948+ memcpy (power_limit , & s_lb_obj -> power , sizeof (lightbulb_power_limit_t ));
1949+ LB_MUTEX_GIVE ();
1950+
1951+ return ESP_OK ;
1952+ }
1953+
19421954esp_err_t lightbulb_update_status (lightbulb_status_t * new_status , bool trigger )
19431955{
19441956 LIGHTBULB_CHECK (new_status , "new_status is null" , return ESP_FAIL );
You can’t perform that action at this time.
0 commit comments