A novel smart oxide can store energy and also indicate the level of charge in it