An electronic device comprising: a first detecting means (1096, 1091) configured to detect that a Universal Serial Bus, USB, type cable is connected to the electronic device; a second detecting means configured to detect a temperature of the USB cable connected to the electronic device; a communicating means configured to receive cable information including information related to the USB cable from the USB cable in case the USB cable is compliant with USB power delivery standard; and a control means that is configured a) to set a threshold temperature (Th) to a second threshold temperature being preset and representing an upper limit value of a permissible temperature of a typical cable to be connected to the electronic device, in a case where the first detecting means (1096, 1091) has detected that the USB cable is connected to the electronic device, b) to set the threshold temperature (Th) to a third threshold temperature representing a temperature value indicated by the cable information, in a case where the third threshold temperature is higher than the second threshold temperature and the communicating means has received the cable information from the USB cable, and c) to control a power supply device to stop supplying power from the power supply device to the electronic device via the USB cable or to control the electronic device to stop receiving power from the power supply device via the USB cable, in a case where a temperature of the USB cable detected by the second detecting means is higher than the set threshold temperature (Th). a first detecting means (1096, 1091) configured to detect that a Universal Serial Bus, USB, type cable is connected to the electronic device; a second detecting means configured to detect a temperature of the USB cable connected to the electronic device; a communicating means configured to receive cable information including information related to the USB cable from the USB cable in case the USB cable is compliant with USB power delivery standard; and a control means that is configured a) to set a threshold temperature (Th) to a second threshold temperature being preset and representing an upper limit value of a permissible temperature of a typical cable to be connected to the electronic device, in a case where the first detecting means (1096, 1091) has detected that the USB cable is connected to the electronic device, b) to set the threshold temperature (Th) to a third threshold temperature representing a temperature value indicated by the cable information, in a case where the third threshold temperature is higher than the second threshold temperature and the communicating means has received the cable information from the USB cable, and c) to control a power supply device to stop supplying power from the power supply device to the electronic device via the USB cable or to control the electronic device to stop receiving power from the power supply device via the USB cable, in a case where a temperature of the USB cable detected by the second detecting means is higher than the set threshold temperature (Th). a) to set a threshold temperature (Th) to a second threshold temperature being preset and representing an upper limit value of a permissible temperature of a typical cable to be connected to the electronic device, in a case where the first detecting means (1096, 1091) has detected that the USB cable is connected to the electronic device, b) to set the threshold temperature (Th) to a third threshold temperature representing a temperature value indicated by the cable information, in a case where the third threshold temperature is higher than the second threshold temperature and the communicating means has received the cable information from the USB cable, and c) to control a power supply device to stop supplying power from the power supply device to the electronic device via the USB cable or to control the electronic device to stop receiving power from the power supply device via the USB cable, in a case where a temperature of the USB cable detected by the second detecting means is higher than the set threshold temperature (Th).