Temperature control is the key element during medicine storage. Pharmacies sell some medical products which are kept in fridges. The opening and closing of the fridge while taking some medicine makes the outside hot air enter the fridge, which will increase the inner fridge temperature. When the frequency of opening and closing of the fridge is increased, the temperature may go beyond the allowed storage temperature range. In this paper, we are proposing a model with the help of machine learning that will be used in multiple chambers fridges to keep indicating the time remaining for the inner temperature to go beyond the allowed range, and if the time is short, the system will propose to the pharmacist not to open that particular room and proposes a room that has enough time slots (time to reach the upper limit temperature). By using training data got from a thermoelectric cooler-based fridge, we constructed a multiple linear regression model that can predict the required time for a given room to reach the cut-off temperature in case that room is opened. The built model was evaluated using the coefficient of determination R2 and is found to be 77%, and then it can be used to develop a multiple room smart fridge for efficiently storing highly sensitive medical products.