Skip to content

Commit f76554f

Browse files
ci(pre-commit): Apply automatic fixes
1 parent 305299d commit f76554f

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

libraries/Zigbee/examples/Zigbee_Fan_Control/Zigbee_Fan_Control.ino

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define ZIGBEE_FAN_CONTROL_ENDPOINT 1
3737

3838
#ifdef RGB_BUILTIN
39-
uint8_t led = RGB_BUILTIN; // To demonstrate the current fan control mode
39+
uint8_t led = RGB_BUILTIN; // To demonstrate the current fan control mode
4040
#else
4141
uint8_t led = 2;
4242
#endif
@@ -49,28 +49,26 @@ ZigbeeFanControl zbFanControl = ZigbeeFanControl(ZIGBEE_FAN_CONTROL_ENDPOINT);
4949
void setFan(ZigbeeFanMode mode) {
5050
switch (mode) {
5151
case FAN_MODE_OFF:
52-
rgbLedWrite(led, 0, 0, 0); // Off
52+
rgbLedWrite(led, 0, 0, 0); // Off
5353
Serial.println("Fan mode: OFF");
5454
break;
5555
case FAN_MODE_LOW:
56-
rgbLedWrite(led, 0, 0, 255); // Blue
56+
rgbLedWrite(led, 0, 0, 255); // Blue
5757
Serial.println("Fan mode: LOW");
5858
break;
5959
case FAN_MODE_MEDIUM:
60-
rgbLedWrite(led, 255, 255, 0); // Yellow
60+
rgbLedWrite(led, 255, 255, 0); // Yellow
6161
Serial.println("Fan mode: MEDIUM");
6262
break;
6363
case FAN_MODE_HIGH:
64-
rgbLedWrite(led, 255, 0, 0); // Red
64+
rgbLedWrite(led, 255, 0, 0); // Red
6565
Serial.println("Fan mode: HIGH");
6666
break;
6767
case FAN_MODE_ON:
68-
rgbLedWrite(led, 255, 255, 255); // White
68+
rgbLedWrite(led, 255, 255, 255); // White
6969
Serial.println("Fan mode: ON");
7070
break;
71-
default:
72-
log_e("Unhandled fan mode: %d", mode);
73-
break;
71+
default: log_e("Unhandled fan mode: %d", mode); break;
7472
}
7573
}
7674

libraries/Zigbee/src/ep/ZigbeeFanControl.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
#if CONFIG_ZB_ENABLED
33

44
ZigbeeFanControl::ZigbeeFanControl(uint8_t endpoint) : ZigbeeEP(endpoint) {
5-
_device_id = ESP_ZB_HA_THERMOSTAT_DEVICE_ID; //There is no FAN_CONTROL_DEVICE_ID in the Zigbee spec
5+
_device_id = ESP_ZB_HA_THERMOSTAT_DEVICE_ID; //There is no FAN_CONTROL_DEVICE_ID in the Zigbee spec
66

77
//Create basic analog sensor clusters without configuration
88
_cluster_list = esp_zb_zcl_cluster_list_create();
99
esp_zb_cluster_list_add_basic_cluster(_cluster_list, esp_zb_basic_cluster_create(NULL), ESP_ZB_ZCL_CLUSTER_SERVER_ROLE);
1010
esp_zb_cluster_list_add_identify_cluster(_cluster_list, esp_zb_identify_cluster_create(NULL), ESP_ZB_ZCL_CLUSTER_SERVER_ROLE);
1111
esp_zb_cluster_list_add_fan_control_cluster(_cluster_list, esp_zb_fan_control_cluster_create(NULL), ESP_ZB_ZCL_CLUSTER_SERVER_ROLE);
1212

13-
_ep_config = {.endpoint = _endpoint, .app_profile_id = ESP_ZB_AF_HA_PROFILE_ID, .app_device_id = ESP_ZB_HA_HEATING_COOLING_UNIT_DEVICE_ID, .app_device_version = 0};
13+
_ep_config = {
14+
.endpoint = _endpoint, .app_profile_id = ESP_ZB_AF_HA_PROFILE_ID, .app_device_id = ESP_ZB_HA_HEATING_COOLING_UNIT_DEVICE_ID, .app_device_version = 0
15+
};
1416
}
1517

1618
bool ZigbeeFanControl::setFanModeSequence(ZigbeeFanModeSequence sequence) {

0 commit comments

Comments
 (0)