Skip to content

Commit 052e16f

Browse files
ci(pre-commit): Apply automatic fixes
1 parent 0f5e953 commit 052e16f

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

docs/en/zigbee/ep_thermostat.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Sets a callback function for receiving humidity data.
8383
.. code-block:: arduino
8484
8585
void onHumidityReceive(void (*callback)(float humidity));
86-
86+
8787
* ``callback`` - Function to call when humidity data is received
8888
* ``humidity`` - Humidity value in percentage
8989

@@ -265,7 +265,7 @@ getHumiditySettings
265265
Requests humidity sensor settings from all bound sensors.
266266

267267
.. code-block:: arduino
268-
268+
269269
void getHumiditySettings();
270270
271271
getHumiditySettings (Group)

libraries/Zigbee/src/ep/ZigbeeThermostat.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,20 @@ void ZigbeeThermostat::findCb(esp_zb_zdp_status_t zdo_status, uint16_t addr, uin
108108
/* 2. Send binding request to self */
109109
bind_req.req_dst_addr = esp_zb_get_short_address();
110110

111-
112111
/* populate the src information of the binding */
113112
esp_zb_get_long_address(bind_req.src_address);
114113
bind_req.src_endp = instance->_endpoint;
115-
bind_req.cluster_id = ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT;
114+
bind_req.cluster_id = ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT;
116115
bind_req.dst_addr_mode = ESP_ZB_ZDO_BIND_DST_ADDR_MODE_64_BIT_EXTENDED;
117116
memcpy(bind_req.dst_address_u.addr_long, sensor->ieee_addr, sizeof(esp_zb_ieee_addr_t));
118117
bind_req.dst_endp = endpoint;
119-
log_i("Try to bind Humidity Measurement"); // Optional cluster to bind, if fails, continue to bind the temperature measurement cluster
118+
log_i("Try to bind Humidity Measurement"); // Optional cluster to bind, if fails, continue to bind the temperature measurement cluster
120119
// save sensor params in the class
121120
instance->_device = sensor;
122121

123122
esp_zb_zdo_device_bind_req(&bind_req, ZigbeeThermostat::bindCbWrapper, NULL);
124123
bind_req.cluster_id = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
125-
log_i("Try to bind Temperature Measurement"); // Mandatory cluster to bind
124+
log_i("Try to bind Temperature Measurement"); // Mandatory cluster to bind
126125
esp_zb_zdo_device_bind_req(&bind_req, ZigbeeThermostat::bindCbWrapper, this);
127126
} else {
128127
log_d("No temperature sensor endpoint found");
@@ -530,8 +529,8 @@ void ZigbeeThermostat::setTemperatureReporting(uint8_t endpoint, esp_zb_ieee_add
530529
report_cmd.record_field = records;
531530

532531
log_i(
533-
"Sending 'configure temperature reporting' command to endpoint %d, ieee address %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", endpoint, ieee_addr[7], ieee_addr[6],
534-
ieee_addr[5], ieee_addr[4], ieee_addr[3], ieee_addr[2], ieee_addr[1], ieee_addr[0]
532+
"Sending 'configure temperature reporting' command to endpoint %d, ieee address %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", endpoint, ieee_addr[7],
533+
ieee_addr[6], ieee_addr[5], ieee_addr[4], ieee_addr[3], ieee_addr[2], ieee_addr[1], ieee_addr[0]
535534
);
536535
esp_zb_lock_acquire(portMAX_DELAY);
537536
esp_zb_zcl_config_report_cmd_req(&report_cmd);
@@ -612,8 +611,8 @@ void ZigbeeThermostat::getHumidity(uint8_t endpoint, esp_zb_ieee_addr_t ieee_add
612611
read_req.attr_field = attributes;
613612

614613
log_i(
615-
"Sending 'read humidity' command to endpoint %d, ieee address %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", endpoint, ieee_addr[7], ieee_addr[6],
616-
ieee_addr[5], ieee_addr[4], ieee_addr[3], ieee_addr[2], ieee_addr[1], ieee_addr[0]
614+
"Sending 'read humidity' command to endpoint %d, ieee address %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", endpoint, ieee_addr[7], ieee_addr[6], ieee_addr[5],
615+
ieee_addr[4], ieee_addr[3], ieee_addr[2], ieee_addr[1], ieee_addr[0]
617616
);
618617
esp_zb_lock_acquire(portMAX_DELAY);
619618
esp_zb_zcl_read_attr_cmd_req(&read_req);

libraries/Zigbee/src/ep/ZigbeeThermostat.h

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class ZigbeeThermostat : public ZigbeeEP {
5656
_on_temp_receive_with_source = callback;
5757
}
5858
// For backward compatibility: keep onConfigReceive as an alias to onTempConfigReceive (deprecated).
59-
[[deprecated("Use onTempConfigReceive instead.")]] void onConfigReceive(void (*callback)(float, float, float)) {
59+
[[deprecated("Use onTempConfigReceive instead.")]]
60+
void onConfigReceive(void (*callback)(float, float, float)) {
6061
onTempConfigReceive(callback);
6162
}
6263
void onTempConfigReceive(void (*callback)(float, float, float)) {
@@ -69,10 +70,22 @@ class ZigbeeThermostat : public ZigbeeEP {
6970
void getTemperature(uint8_t endpoint, esp_zb_ieee_addr_t ieee_addr);
7071

7172
// For backward compatibility: keep getSensorSettings as an alias to getTemperatureSettings (deprecated).
72-
[[deprecated("Use getTemperatureSettings instead.")]] void getSensorSettings() { getTemperatureSettings(); }
73-
[[deprecated("Use getTemperatureSettings instead.")]] void getSensorSettings(uint16_t group_addr) { getTemperatureSettings(group_addr); }
74-
[[deprecated("Use getTemperatureSettings instead.")]] void getSensorSettings(uint8_t endpoint, uint16_t short_addr) { getTemperatureSettings(endpoint, short_addr); }
75-
[[deprecated("Use getTemperatureSettings instead.")]] void getSensorSettings(uint8_t endpoint, esp_zb_ieee_addr_t ieee_addr) { getTemperatureSettings(endpoint, ieee_addr); }
73+
[[deprecated("Use getTemperatureSettings instead.")]]
74+
void getSensorSettings() {
75+
getTemperatureSettings();
76+
}
77+
[[deprecated("Use getTemperatureSettings instead.")]]
78+
void getSensorSettings(uint16_t group_addr) {
79+
getTemperatureSettings(group_addr);
80+
}
81+
[[deprecated("Use getTemperatureSettings instead.")]]
82+
void getSensorSettings(uint8_t endpoint, uint16_t short_addr) {
83+
getTemperatureSettings(endpoint, short_addr);
84+
}
85+
[[deprecated("Use getTemperatureSettings instead.")]]
86+
void getSensorSettings(uint8_t endpoint, esp_zb_ieee_addr_t ieee_addr) {
87+
getTemperatureSettings(endpoint, ieee_addr);
88+
}
7689

7790
void getTemperatureSettings();
7891
void getTemperatureSettings(uint16_t group_addr);

0 commit comments

Comments
 (0)