Affordable cameras that can double as motion sensors?

There are a number of camera modules available but really what I would prefer is something that is locally controlled (can have cloud support but home assistant integrates locally) and that can act as a motion sensor for home-assistant.

Trying to cover video and motion /occupancy with one stone here on a budget. Any suggestions?

Cameras don’t work nearly as well as PIR sensors. Any type of change in the image triggers them. Sunlight, bugs TVs. PIRs are more tolerant using infrared (heat) and having some pet immunity are much more reliable as a people detector.