What about waiting for hotend temperature, works either heating or cooling.
M109 - Wait for Hotend Temperature
thermal Wait for the hot end to reach its target.
This command optionally sets a new target hot end temperature and waits for the target temperature to be reached before proceeding. If the temperature is set with S then M109 waits only when heating. If the temperature is set with R then M109 will also wait for the temperature to go down.
M109 [B<temp>] [F<flag>] [R<temp>] [S<temp>] [T<index>]