Let's be precise. When we say "convert heat to power", what we mean is actually "if we have some energy flowing from a heat source to a heat sink, we can extract a percentage of that energy as useful work, like turning a steam turbine to produce electricity".
Carnot proved in 1824 that the maximum theoretical efficiency is purely a function of the hot and cold temperature (in Kelvin):
Eff = (T_hot - T_cold)/T_hot
So for instance a thermoelectric generator operating between 25 °C and 5 °C has a maximum efficiency of
Eff = (298 - 278) / 298 = 6.7%