A device for measuring pressure in a patients heart is provided that comprises a sensor device, which detects the difference in pressure between a point inside the heart and the space lying outside the heart inside the thorax. An element of the sensor device, such as a sensor, may be arranged on a device connected to the heart, such as a heart pump or a cardiac pacemaker.