|
|
@ -97,12 +97,14 @@ void buttonEvent(unsigned int id, unsigned char event) { |
|
|
|
DEBUG_MSG_P(PSTR("[BUTTON] Button #%u event %u\n"), id, event); |
|
|
|
if (event == 0) return; |
|
|
|
|
|
|
|
unsigned char action = buttonAction(id, event); |
|
|
|
|
|
|
|
#if MQTT_SUPPORT
|
|
|
|
buttonMQTT(id, event); |
|
|
|
if (action != BUTTON_MODE_NONE || BUTTON_MQTT_SEND_ALL_EVENTS) { |
|
|
|
buttonMQTT(id, event); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
|
|
|
|
unsigned char action = buttonAction(id, event); |
|
|
|
|
|
|
|
if (action == BUTTON_MODE_TOGGLE) { |
|
|
|
if (_buttons[id].relayID > 0) { |
|
|
|
relayToggle(_buttons[id].relayID - 1); |
|
|
|