I'm finding that the pets don't utilize their dash/dive consistently. This script checks the pet class that would have dash/dive and pet level, then casts the pet action bar slot 7, which is where I use the dash/dive. I only used two pet classes for this example, however all the pet classes that utilize that ability should be listed. The slot can be changed to whatever you use for that pet ability.
Code:
function PetCharge_Macro()
if UnitCreatureFamily("Pet") == "Cat" or
UnitCreatureFamily("Pet") == "Carrion Bird" and UnitLevel("Pet") >= 33 then
CastPetAction(7);
end
end
I use this function in a custom MacroLibrary LUA as part of multiple pet attack/assist macros for different spells.