Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bfe205e

Browse filesBrowse files
min/max params for temperature
1 parent ef2a685 commit bfe205e
Copy full SHA for bfe205e

File tree

Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed

‎libraries/Zigbee/src/ep/ZigbeeHueLight.cpp

Copy file name to clipboardExpand all lines: libraries/Zigbee/src/ep/ZigbeeHueLight.cpp
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#if CONFIG_ZB_ENABLED
44

55
ZigbeeHueLight::ZigbeeHueLight(uint8_t endpoint,
6-
es_zb_hue_light_type_t light_type)
6+
es_zb_hue_light_type_t light_type, uint16_t min_temp, uint16_t max_temp)
77
: ZigbeeEP(endpoint)
88
{
99
uint16_t color_capabilities = 0;
@@ -57,8 +57,6 @@ ZigbeeHueLight::ZigbeeHueLight(uint8_t endpoint,
5757
uint8_t current_y = 0;
5858

5959
uint16_t color_attr = ESP_ZB_ZCL_COLOR_CONTROL_COLOR_TEMPERATURE_DEF_VALUE;
60-
uint16_t min_temp = 153;
61-
uint16_t max_temp = 500;
6260

6361
esp_zb_attribute_list_t *color_cluster = esp_zb_cluster_list_get_cluster(_cluster_list, ESP_ZB_ZCL_CLUSTER_ID_COLOR_CONTROL, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE);
6462
esp_zb_color_control_cluster_add_attr(color_cluster, ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_MODE_ID, &color_mode);
@@ -94,6 +92,10 @@ ZigbeeHueLight::ZigbeeHueLight(uint8_t endpoint,
9492
_current_temperature = 300;
9593
}
9694

95+
ZigbeeHueLight::ZigbeeHueLight(uint8_t endpoint,
96+
es_zb_hue_light_type_t light_type): ZigbeeHueLight(endpoint, light_type, 153, 450) {}
97+
98+
9799
uint16_t ZigbeeHueLight::getCurrentColorTemperature() {
98100
return (*(uint16_t *)esp_zb_zcl_get_attribute(
99101
_endpoint, ESP_ZB_ZCL_CLUSTER_ID_COLOR_CONTROL, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_TEMPERATURE_ID

‎libraries/Zigbee/src/ep/ZigbeeHueLight.h

Copy file name to clipboardExpand all lines: libraries/Zigbee/src/ep/ZigbeeHueLight.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ typedef enum
6161

6262
class ZigbeeHueLight : public ZigbeeEP {
6363
public:
64+
ZigbeeHueLight(uint8_t endpoint, es_zb_hue_light_type_t light_type, uint16_t min_temp, uint16_t max_temp);
6465
ZigbeeHueLight(uint8_t endpoint, es_zb_hue_light_type_t light_type);
6566
~ZigbeeHueLight() {}
6667

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.