It's an NPN transistor- a very common one. You can find the data sheet easily by searching. They're around a dime each in small quantities from any distributor.
They've tied the base and collector together so it's a diode-connected transistor.
Such a diode-connected transistor follows the ideal diode equation more closely than a real diode at lower currents.
In the simplest implementation you put a current (say 100uA~1mA) through the transistor and it has a forward voltage of around 600mV that changes at about -2mV/°C. However the forward voltage and the tempco vary from unit to unit.
By using two or three different currents you can cancel out the unit variations and also the resistance of wires going to the sensor by using a bit of math and choosing the currents carefully. It's possible to get interchangeability of sensors in the +/-1°C range typically without calibration or selection.
This exact method is used to monitor CPU die temperature in a PC- the diode is part of the CPU chip.
If you want to test if it is functional, many multimeters have a diode test function that should show a number such as something between 500 and 600 in one direction, and overrange (open) in the other direction. If it reads something like that, it's almost surely functional.
I'm going to post this as an answer as I've seen the same type of question come up multiple times, and for each I've basically commented the same thing:
It's pretty much impossible to identify this sort of component unless you either have a BOM of the circuit, schematic, or already know what they are.
If you have some rough idea of the function they perform and it is something more complex than say a discreet transistor, then you may be able to identify them by searching for parts with that functionality on manufacturer websites and comparing marking codes from datasheets. But really this is a shot in the dark.
Having said that, based on your description, the SOT23 package device is almost certainly some sort of TVS device - used for ESD and Transient (EFT) protection on inputs. These are quite common on RS485 devices as per this TI application note. There are components like this specifically for RS485 in the same package like this one. Doesn't have the same marking code, but will like have the same function.
The other package as pointed out by @jp314 in the comments is likely some kind of line filter. As you have found WE has some in a similar package with similar markings, so this is quite clearly what it is. In fact looking at the datasheets from that link, this part has a marking of 500
and looks identical to your picture.
For both of these parts, it could be inferred from the circuit what the parts do. Finding a datasheet for the exact part is the hard bit.
Best Answer
Been searching the internet top to toe for an answer too, I think the best I could come up with alongside the H bridge was this Vishay resistor network ic. The naming on the datasheet doesn’t line up at all so not convinced I’m correct, but just thought I’d share.