I'm now building my own switch for my panels (don't ask me why; I just like to do things the hard way, I guess) and instead of physical electrical contacts, I'm trying to do it with the TCST1103 optical sensor.
I've got it wired up and configured in MobiFlight as a button. My physical design is such that a small tab will block the sensor when my switch is in the pressed state. Due to how the sensor works, however, the actual electrical behaviour is the opposite -- that is, when there is nothing blocking the optics, it allows the incoming signal to pass through. And since the button device in the firmware uses INPUT_PULLUP, this is treated as the pressed state of the button in MobiFlight.
Is there any easy way to invert the logic?