Correct, "an" before a silent "h", as you have done.
Technically, "an" is used before a vowel sound, whether or not the next word begins with a vowel or a consonant. The reason for this is to prevent the "stop" you could experience if you were to pronounce "a" and a vowel sound following it, e.g. trying pronouncing "a orange" versus "an orange".
So some obvious ones like "a place to live", "a very good idea" and so on; then "an idea to rock your world", "an ultimatum to change everything we know", etc.
Then, we have "an hour until lunch" and "an heir to the throne", but then we have "a horrible situation" and "a hatching egg".
Finally, to demonstrate it's about the sound, "a one-off promotion", "a uniformed officer" and "an SOS call" (where in the last case, the noun after "an" is pronounced as "es-oh-es").