|
1 | 1 | #include "ZigbeeTempSensor.h"
|
2 |
| -#if SOC_IEEE802154_SUPPORTED |
| 2 | +#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED |
3 | 3 |
|
4 | 4 | ZigbeeTempSensor::ZigbeeTempSensor(uint8_t endpoint) : ZigbeeEP(endpoint) {
|
5 | 5 | _device_id = ESP_ZB_HA_TEMPERATURE_SENSOR_DEVICE_ID;
|
@@ -80,7 +80,6 @@ void ZigbeeTempSensor::reportTemperature() {
|
80 | 80 | esp_zb_zcl_report_attr_cmd_t report_attr_cmd;
|
81 | 81 | report_attr_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
|
82 | 82 | report_attr_cmd.attributeID = ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID;
|
83 |
| - report_attr_cmd.cluster_role = ESP_ZB_ZCL_CLUSTER_SERVER_ROLE; |
84 | 83 | report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
|
85 | 84 | report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
|
86 | 85 |
|
@@ -121,7 +120,6 @@ void ZigbeeTempSensor::reportHumidity() {
|
121 | 120 | esp_zb_zcl_report_attr_cmd_t report_attr_cmd;
|
122 | 121 | report_attr_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
|
123 | 122 | report_attr_cmd.attributeID = ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_VALUE_ID;
|
124 |
| - report_attr_cmd.cluster_role = ESP_ZB_ZCL_CLUSTER_SERVER_ROLE; |
125 | 123 | report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT;
|
126 | 124 | report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
|
127 | 125 |
|
@@ -161,4 +159,4 @@ void ZigbeeTempSensor::setHumidityReporting(uint16_t min_interval, uint16_t max_
|
161 | 159 | esp_zb_zcl_update_reporting_info(&reporting_info);
|
162 | 160 | }
|
163 | 161 |
|
164 |
| -#endif //SOC_IEEE802154_SUPPORTED |
| 162 | +#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED |
0 commit comments