I have a two stroke Mercury 150 EFI that was doing similar a few weeks back. It was the oil reservoir float switch. Initially checked it with a meter to confirm it was bad and then replaced the reservoir in about 20 minutes. Problem fixed. I have the service manual for motor, so that helps.
I had a similar problem with a 90 HP 2 stroke Mercury. It is possible to fix the float switch wit a little skill and patience. The plastic float becomes separated from the contact switch. Careful removal of the float, cleaning and superglue.
Check the float switch on the motor oil tank, sometimes they can separate from the float causing the alarm, this is the most often cause. If that checks out then check the height of oil in oil tank on the motor. Sometimes I have had to fill the tank again to keep the float high enough to keep the alarm from going off. Check to see if there is a hole in the lines from your reserve tank. A pin hole will cause the tank to drop a little at a time.
Also that alarm can indicate water in the fuel water filter.
A solid beep is that the motor is overheating.
This is for a 2 stroke Mecury and I believe Yamaha is similar.