For different reasons I need the same function. My issue is that at times one of my cameras stays on camera.record indefinitely. So far the only way I’ve been able to fix the issue is by powering down the camera then turning it back on.
I tried using camera.turn_off and that doesn’t work. For testing purposes I have setup the power supply of the camera behind a relay that I can control via HA. Seems a simple camera.stop_record would fix the issue.