An oil temperature sensor, comprising: a housing assembly in which a lead frame (11,12) on which a thermistor for detecting a temperature of oil is mounted is integrated with a housing, a cable-attached terminal including a cable and a joint terminal portion, the joint terminal portion being connected electrically to a conductor exposed from a sheath of the cable, the joint terminal portion includes a cable connecting portion (235,236) and a connecting terminal portion, the cable connecting portion (235,236) being connected to the cable, characterized in that the lead frame (11,12) on which the thermistor for detecting a temperature of oil is mounted is integrated with the housing in a manner that a tip-side terminal portion (112,122) of the lead frame (11,12) is exposed outward, wherein the housing includes a groove formed linearly and into which a cable-attached terminal is inserted, the joint terminal portion being connected electrically to the tip-side terminal portion (112,122), the groove is formed to be opened on both sides in an extending direction of the groove and opened in one direction crossing the extending direction, the joint terminal portion and the sheath of the cable are partially inserted into the groove, and the joint terminal portion includes the cable connecting portion (235,236), a portion to be inserted, and the connecting terminal portion, the cable connecting portion (235,236) being connected to the cable and inserted into the groove, the portion to be inserted being provided continuously from the cable connecting portion (235,236) and inserted into the groove, and the connecting terminal portion being provided continuously from the portion to be inserted, exposed outward from the housing, and connected electrically to the tip-side terminal portion (112,122). a housing assembly in which a lead frame (11,12) on which a thermistor for detecting a temperature of oil is mounted is integrated with a housing, a cable-attached terminal including a cable and a joint terminal portion, the joint terminal portion being connected electrically to a conductor exposed from a sheath of the cable, the joint terminal portion includes a cable connecting portion (235,236) and a connecting terminal portion, the cable connecting portion (235,236) being connected to the cable, characterized in that the lead frame (11,12) on which the thermistor for detecting a temperature of oil is mounted is integrated with the housing in a manner that a tip-side terminal portion (112,122) of the lead frame (11,12) is exposed outward, wherein the housing includes a groove formed linearly and into which a cable-attached terminal is inserted, the joint terminal portion being connected electrically to the tip-side terminal portion (112,122), the groove is formed to be opened on both sides in an extending direction of the groove and opened in one direction crossing the extending direction, the joint terminal portion and the sheath of the cable are partially inserted into the groove, and the joint terminal portion includes the cable connecting portion (235,236), a portion to be inserted, and the connecting terminal portion, the cable connecting portion (235,236) being connected to the cable and inserted into the groove, the portion to be inserted being provided continuously from the cable connecting portion (235,236) and inserted into the groove, and the connecting terminal portion being provided continuously from the portion to be inserted, exposed outward from the housing, and connected electrically to the tip-side terminal portion (112,122).