Automatic detection of loss of refrigerant