API command for disabling a button?

As I’ve just discovered here: RFH: Switch between I2S line-in and I2S microphone - #10 by Stutchbury

you can send a JSON API post from Home Assistant to update the WLED config (and also trigger a reset if required). Once you have the rest_command: written in the configuration.yaml, you can make a service request from an automation or UI button.

HTH