A new method for separating variables in the Maxwell equations in four- and higher-dimensional Kerr-(A)dS spacetimes proposed recently by Lunin is generalized to any off-shell metric that admits a principal Killing-Yano tensor. The key observation is that Lunin's ansatz for the vector potential can be formulated in a covariant form-in terms of the principal tensor.
In particular, focusing on the fourdimensional case we demonstrate separability of Maxwell's equations in the Kerr-NUT-(A)dS and the Plebanski-Demianski family of spacetimes. The new method of separation of variables is quite different from the standard approach based on the Newman-Penrose formalism.