Changing color of a device when it's down on a Custom Maps

Hello,

Is there a way to change image or color of it on a Custom Map when a device is down ?

I want to show the switch on my map in red when it’s down for my monitoring.