The end pattern 'ed' has three ways in which it is pronounced. 'ED' can be pronounced /d/ /id/ /t/. For example, washed /t/, needed /id/, enjoyed /d/ all have an 'ed' ending but are pronounced differently.
What is the rule?
Surprisingly, there is a reason why there are three different pronunciation for 'ed' endings.
/Id/ ~ for infinitives that end in /t/ or /d/ = needed, hated, seated
/d/ ~ for infinitives that end with a voiced sound = tried, enjoyed, lived
/t/ ~ for infinitives that end in an unvoiced sound = washed, shopped, hoped