The easiest way to do this is going to be through the use of an alert suppression as the trigger condition may not be able to handle the logic. Let's say the primary device is A and the failover is B. What you would want is as follows:
Trigger when all of the following apply:
Node Name is equal to A
Node Status is equal to down
Then in the Alert Suppression tab:
Node Name is equal to B
Node Status is equal to Up.
What will then happen is when node A goes down, it won't trigger the alert, as long as node B Up, indicating the failover would have taken place. Only when the suppression is not met, when Node B is also down, will the alert then trigger.