Sometimes its a bit tricky because the spells can have different id's in different tree's with the same name, and sometimes the spell id is different from the TargetAura id.
if MaxDps:SpellAvailable(_HammerofWrath, timeShift) and holyPower <=4 and MaxDps:TargetPercentHealth() < 0.2 then
update: I guess i worked around it by also adding MaxDps:TargetPercentHealth() > 0
How do you check for this? Notice there's no ID associated with it.
In holy spec there's no Aura like there is in Prot, and TargetAura doesn't work with targets that are immune, such as bosses. Can you force a 12 sec cd?
if MaxDps:SpellAvailable(_HolyConsecration, timeShift) and not MaxDps:TargetAura(_HolyConsecrationAura, timeShift) then