Disable one switch until another allows it to be enabled

  1. BUTTON ONE — HOME Z,XY

switch.home.enable true
switch.home.input_pin 1.25^
switch.home.input_pin_behavior momentary
switch.home.output_on_command M32_homep.gcode #home Z axis first and then x and y, the move to corner of bed.

Button two moves the axes to another useful position, but it shouldn’t be allowed until after the machine has been homed.
I want button two disabled until after button one has completed homing. Button two should then be enabled unconditionally.
How do I do this? Can Gcode at the end of the homing program alter button two configuration?
Or can High Center program check for button one to be completed somehow?
Can IF/THEN commands be used somehow?

  1. BUTTON TWO — MOVE TO HIGH CENTER

switch.high_center.start_up_state false
switch.high_center.enable true
switch.high_center.input_pin 1.27^
switch.high_center.input_pin_behavior momentary #push once to move to high center
switch.high_center.output_on_command M32_highcenter.gcode #run high center program

Imported from wikidot