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;
44
44
45
45
void fanSwitch (bool state) {
46
46
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 ();
54
50
}
55
51
56
52
void humidifierSwitch (bool state) {
Original file line number Diff line number Diff line change @@ -62,11 +62,11 @@ enum zigbee_binary_clusters {
62
62
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_OTHER 0x0000FFFF // Type 0x00, Index 0xFFFF
63
63
64
64
// 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
70
70
71
71
typedef struct zigbee_binary_cfg_s {
72
72
esp_zb_basic_cluster_cfg_t basic_cfg;
You can’t perform that action at this time.
0 commit comments