File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -419,6 +419,7 @@ void serializeConfig() {
419419
420420 JsonArray hw_btn_ins = hw_btn.createNestedArray (" ins" );
421421
422+ #if defined(BTNPIN) && BTNPIN > -1
422423 JsonObject hw_btn_ins_0 = hw_btn_ins.createNestedObject ();
423424 hw_btn_ins_0[F (" type" )] = (buttonEnabled) ? BTN_TYPE_PUSH : BTN_TYPE_NONE;
424425
@@ -429,16 +430,21 @@ void serializeConfig() {
429430 hw_btn_ins_0_macros.add (macroButton);
430431 hw_btn_ins_0_macros.add (macroLongPress);
431432 hw_btn_ins_0_macros.add (macroDoublePress);
433+ #endif
432434
435+ #if defined(IRPIN) && IRPIN > -1
433436 JsonObject hw_ir = hw.createNestedObject (" ir" );
434437 hw_ir[F (" pin" )] = IR_PIN;
435438 hw_ir[F (" type" )] = 0 ;
439+ #endif
436440
441+ #if defined(RLYPIN) && RLYPIN > -1
437442 JsonObject hw_relay = hw.createNestedObject (" relay" );
438443 hw_relay[F (" pin" )] = RLYPIN;
439444 hw_relay[F (" rev" )] = (RLYMDE) ? false : true ;
440445 JsonObject hw_status = hw.createNestedObject (" status" );
441446 hw_status[F (" pin" )] = -1 ;
447+ #endif
442448
443449 JsonObject light = doc.createNestedObject (" light" );
444450 light[F (" scale-bri" )] = briMultiplier;
You can’t perform that action at this time.
0 commit comments