Need help with the proximity sensor of the 3D Printhead

I did some reconnaissance for the purposes of replacement here A350 - printing on glass

Output out the bench, out of the circuit is:
Triggered: 0.7V
Not triggered: 2.0V

Supply Voltage is 24V