Schematic diagram
Circuit explanation:
The 7-segment LED display is connected to ports RB0..RB6 which are configured as outputs.
The Dallas DS1820 digital temperature sensor is connected to port RA3, which is sometimes input, sometimes output
(2 way data stream) controlled by the software.
The relay is controlled by port RA0 (configured as output).
Some pictures: