File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed
examples/Zigbee_Binary_Input_Output Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -44,13 +44,9 @@ bool zoneStatus = false;
4444
4545void 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
5652void humidifierSwitch (bool state) {
Original file line number Diff line number Diff 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
7171typedef struct zigbee_binary_cfg_s {
7272 esp_zb_basic_cluster_cfg_t basic_cfg;
You can’t perform that action at this time.
0 commit comments