I am reading a KWH point from a power meter. I am reading this point every 1 minute with it logging every 5. Sometimes in my log, I am getting a NAN, or rather a #NAN. I want to make a script that when this happens as it is logging, it will put in the last good reading.
Ive tried this script but its not working. Any one else, have something to do this?
if ((!p367.value)) return my.ago(MINUTE,5);
else return p367.value;