Add persisted storage of historical data up to a certain value for detection of flapping and state changes.