def value(self):
        """Get the battery charge percent and cache it."""
        if self.last_value == -1:
            state = self.battery_status()
        elif self.interval > time.time()-self.checked:
            state = self.battery_status()
        else:
            return self.last_value
        self.last_value = state
        return state
dataset/ETHPy150Open richrd/suplemon/suplemon/modules/battery.py/Battery.value/swapped operands of `>`