WTH, Why can't I start/stop recordings or view if a camera is recording

What the heck!

Right now when triggering the camera.record service it records a predefined time. Whenever you call a second camera.record service for the same camera it logs an error that it is already recording.

I think it is useful to get an is_recording attribute for camera entities or (even better) camera.start_recording and camera.stop_recording services.

My use case is that whenever there is motion, start recording and whenever there is no motion for x seconds, stop recording. As workaround I now have an automation that checks when the time is expired in the camera.record service, it checks if there is still motion and then triggers another recording if that is the case. It works but is a bit hacky imo.

Edit: this is using the generic camera integration.

This depends on the integration. For example, the zoneminder integration can do this. I recommend putting the camera integration in this WTH.

I’m using the generic camera integration. RTSP feed straight into home assistant