Browse Source

Add option to disable relay reporting to MQTT

rules-rpn
Niek van der Maas 5 years ago
parent
commit
a072ada7ae
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      code/espurna/config/general.h
  2. +1
    -1
      code/espurna/relay.ino

+ 4
- 0
code/espurna/config/general.h View File

@ -356,6 +356,10 @@
#define RELAY_SAVE_DELAY 1000 #define RELAY_SAVE_DELAY 1000
#endif #endif
#ifndef RELAY_REPORT_STATUS
#define RELAY_REPORT_STATUS 1
#endif
// Configure the MQTT payload for ON/OFF // Configure the MQTT payload for ON/OFF
#ifndef RELAY_MQTT_ON #ifndef RELAY_MQTT_ON
#define RELAY_MQTT_ON "1" #define RELAY_MQTT_ON "1"


+ 1
- 1
code/espurna/relay.ino View File

@ -339,7 +339,7 @@ bool relayStatus(unsigned char id, bool status, bool report, bool group_report)
} }
bool relayStatus(unsigned char id, bool status) { 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) { bool relayStatus(unsigned char id) {


Loading…
Cancel
Save