Take a look at the History_stats integration:
- Assume you are monitoring some binary_sensor which is normally ON. Set up a history_stats sensor: if the monitored binary_sensor = OFF starting from 00:00 - then the sensor is increased by 1. I.e. this sensor will give a number of ON->OFF transitions within some defined period (here - a day).
- In the Picture elements card: assign an “orange” style to an element if that sensor > 0. Use card-mod to this conditional styling.