This time of year, hanging bird feeders attract a wide range of colorful birds, and at least a few optimistic squirrels out to steal the birds’ lunch. But, according to the state’s environmental agency, those feeders also ring the dinner bell for bears.

Black bears are attracted to “garbage, pet food, compost piles, fruit trees, and bird feeders around houses,” the state’s Department of Energy and Environmental Protection (DEEP) wrote in a press release last week.

DEEP’s release said that residents should not fill bird feeders from late March through November. If residents want to have a bird feeder up, the release said, then it should hang at least 10 feet above the ground and six feet away from any tree trunks.

Sue Gillis, a Ridgebury resident, said she had a black bear wander through her yard over Memorial Day weekend.

“He was so sweet just ambling through our yard,” Gillis told The Press. “Glad that I looked out and didn’t just follow routine and take the dog out!”

DEEP also recommends storing garbage cans inside a garage or shed to keep bears out. “Add ammonia to trash to make it unpalatable,” the agency said.

Grills should also be stored away after use, as well as pet food. Meat, or anything sweet, should be kept out of any compost piles.

“Bears that become accustomed to finding food near your home may become ‘problem’ bears,” DEEP said.