He also pleaded not guilty to a misdemeanor count of possession of methamphetamine.
A preliminary felony charge of attempted murder was dropped because of insufficient evidence of intent, according to the District Attorney's Office.
Lomeli was with the victim, a 60-year-old Redwood City man, at the victim's home and then left in the early morning on April 30, according to District Attorney Steve Wagstaffe. After he left, the victim realized his cellphone was missing and thought Lomeli had stolen it.
He got in his car and went looking for Lomeli and found him in the 3700 block of Haven Avenue in Menlo Park at about 1:13 p.m, according to Wagstaffe.
The victim confronted Lomeli, who allegedly pulled out a box cutter and slashed and stabbed him five times in the back of the head and neck, Wagstaffe said.
When passersby intervened, Lomeli fled the scene and threw the box cutter in a slough, where it was recovered by police, Wagstaffe said.
Officers found Lomeli near Marsh Road and Highway 101 in Menlo Park. He was allegedly carrying a small amount of methamphetamine when he was arrested, according to Wagstaffe.
The victim was treated at Stanford Hospital for non-life-threatening injuries, Menlo Park Police Department spokesperson Nicole Acker said.