w = wmi.WMI(namespace='root\\OpenHardwareMonitor')
temperature_infos = w.Sensor()
for sensor in temperature_infos:
    if sensor.SensorType == 'Temperature':
        print(sensor.Name)
print(sensor.Value)
Accessing CPU temperature in python