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

Sign up
Appearance settings

Commit 8fbf1f9

Browse files
fix(zigbee): Remove duplicate and update formatting
1 parent f2aa056 commit 8fbf1f9

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

‎libraries/Zigbee/examples/Zigbee_Binary_Input_Output/Zigbee_Binary_Input_Output.ino

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ bool zoneStatus = false;
4444

4545
void fanSwitch(bool state) {
4646
Serial.println("Fan switch changed to: " + String(state));
47-
if (state) {
48-
zbBinaryFan.setBinaryInput(state);
49-
zbBinaryFan.reportBinaryInput();
50-
} else {
51-
zbBinaryFan.setBinaryInput(state);
52-
zbBinaryFan.reportBinaryInput();
53-
}
47+
// Switch Fan status input signalling the fan status has changed
48+
zbBinaryFan.setBinaryInput(state);
49+
zbBinaryFan.reportBinaryInput();
5450
}
5551

5652
void humidifierSwitch(bool state) {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ enum zigbee_binary_clusters {
6262
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_OTHER 0x0000FFFF // Type 0x00, Index 0xFFFF
6363

6464
// Security application types for Binary Output
65-
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ARM_DISARM_COMMAND 0x01000000 // Type 0x01, Index 0x0000
66-
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_OCCUPANCY_CONTROL 0x01000001 // Type 0x01, Index 0x0001
67-
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ENABLE_CONTROL 0x01000002 // Type 0x01, Index 0x0002
68-
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ACCESS_CONTROL 0x01000003 // Type 0x01, Index 0x0003
69-
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_OTHER 0x0100FFFF // Type 0x01, Index 0xFFFF
65+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ARM_DISARM_COMMAND 0x01000000 // Type 0x01, Index 0x0000
66+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_OCCUPANCY_CONTROL 0x01000001 // Type 0x01, Index 0x0001
67+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ENABLE_CONTROL 0x01000002 // Type 0x01, Index 0x0002
68+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ACCESS_CONTROL 0x01000003 // Type 0x01, Index 0x0003
69+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_OTHER 0x0100FFFF // Type 0x01, Index 0xFFFF
7070

7171
typedef struct zigbee_binary_cfg_s {
7272
esp_zb_basic_cluster_cfg_t basic_cfg;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /