File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -388,9 +388,15 @@ void Button::HandleSwitch(void) {
388388 break ;
389389 case 6 : // Custom button B
390390 CustomButton = !CustomButton;
391+ #if MQTT && defined(SMARTEVSE_VERSION) // ESP32 only
392+ MQTTclient.publish (MQTTprefix + " /CustomButton" , CustomButton ? " On" : " Off" , false , 0 );
393+ #endif
391394 break ;
392395 case 7 : // Custom button S
393396 CustomButton = true ;
397+ #if MQTT && defined(SMARTEVSE_VERSION) // ESP32 only
398+ MQTTclient.publish (MQTTprefix + " /CustomButton" , CustomButton ? " On" : " Off" , false , 0 );
399+ #endif
394400 break ;
395401 default :
396402 if (State == STATE_C) { // Menu option Access is set to Disabled
@@ -439,6 +445,9 @@ void Button::HandleSwitch(void) {
439445 break ;
440446 case 7 : // Custom button S
441447 CustomButton = false ;
448+ #if MQTT && defined(SMARTEVSE_VERSION) // ESP32 only
449+ MQTTclient.publish (MQTTprefix + " /CustomButton" , CustomButton ? " On" : " Off" , false , 0 );
450+ #endif
442451 break ;
443452 default :
444453 break ;
You can’t perform that action at this time.
0 commit comments