Browse Source

Use mqttForward() instead

pull/1645/head
Niek van der Maas 5 years ago
parent
commit
83dc391208
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      code/espurna/mqtt.ino
  2. +2
    -2
      code/espurna/relay.ino

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

@ -237,7 +237,7 @@ void _mqttConfigure() {
// Getters and setters
_mqtt_setter = getSetting("mqttSetter", MQTT_SETTER);
_mqtt_getter = getSetting("mqttGetter", MQTT_GETTER);
_mqtt_forward = !_mqtt_getter.equals(_mqtt_setter);
_mqtt_forward = !_mqtt_getter.equals(_mqtt_setter) && RELAY_REPORT_STATUS;
// MQTT options
_mqtt_qos = getSetting("mqttQoS", MQTT_QOS).toInt();


+ 2
- 2
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) {
return relayStatus(id, status, RELAY_REPORT_STATUS, true);
return relayStatus(id, status, mqttForward(), true);
}
bool relayStatus(unsigned char id) {
@ -436,7 +436,7 @@ void relayToggle(unsigned char id, bool report, bool group_report) {
}
void relayToggle(unsigned char id) {
relayToggle(id, RELAY_REPORT_STATUS, true);
relayToggle(id, mqttForward(), true);
}
unsigned char relayCount() {


Loading…
Cancel
Save