Trigger help on mqtt

Goodmorning everyone
I have a mqtt input, which every 10 seconds tells me the status of a device (true or false). I would like to send an email only with each change of state, and not every time I receive a publisher. how can do ? thank you for your reply - Paolo

Take a look at the RBE node (report by exception).

thanks with RBE it's ok