Icon State colour change on last update?

Take a look at the History_stats integration:

  1. 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).
  2. In the Picture elements card: assign an “orange” style to an element if that sensor > 0. Use card-mod to this conditional styling.