diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 8c74394c..c1404d61 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -356,6 +356,10 @@ #define RELAY_SAVE_DELAY 1000 #endif +#ifndef RELAY_REPORT_STATUS +#define RELAY_REPORT_STATUS 1 +#endif + // Configure the MQTT payload for ON/OFF #ifndef RELAY_MQTT_ON #define RELAY_MQTT_ON "1" diff --git a/code/espurna/relay.ino b/code/espurna/relay.ino index 9fb78dc1..2d784d77 100644 --- a/code/espurna/relay.ino +++ b/code/espurna/relay.ino @@ -339,7 +339,7 @@ bool relayStatus(unsigned char id, bool status, bool report, bool group_report) } bool relayStatus(unsigned char id, bool status) { - return relayStatus(id, status, true, true); + return relayStatus(id, status, RELAY_REPORT_STATUS, true); } bool relayStatus(unsigned char id) {