The electric device (100) has a body (102) having a resistor (107) comprising a phase change material being changeable between a first phase and a second phase. The resistor (107) has a first electrical resistance when the phase change material is in the first phase, and a second electrical resistance, different from the first electrical resistance, when the phase change material is in the second phase. The phase change material constitutes a conductive path between a first contact area and a second contact area. A cross-section of the conductive path is smaller than the first contact area and the second contact area. The body (102) may further have a heating element 106 being able to conduct a current for enabling a transition from the first phase to the second phase. The heating element (106) is preferably arranged in parallel with the resistor (107).