"NotImplementedError" when automating `camera.turn_on` or `camera.turn_off`

As the title explains, I am trying to create an automation to turn a Frigate camera on/off.

Frigate release notes suggest that this should be possible:

Dynamically Enable and Disable Cameras

Frigate now offers the ability to enable / disable cameras dynamically, including buttons in the UI, MQTT, and using the camera.turn_on / camera.turn_off services in the Home Assistant Integration. Disabling a camera stops all of Frigate’s decoding and processing for that camera. See the documentation.

A simplified version of my configuration is:

id: '1761433576750'
alias: Toggle Camera Test
description: ''
triggers:
  - trigger: state
    entity_id:
      - input_boolean.toggle_cam
conditions: []
actions:
  - action: notify.mobile_app_me
    metadata: {}
    data:
      message: Camera is {{ trigger.to_state.state }}
  - if:
      - condition: template
        value_template: '{{ trigger.to_state.state == "on" }}'
    then:
      - action: camera.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: camera.camera_1
    else:
      - action: camera.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: camera.camera_1
mode: single

I receive the configured notification, however, When it comes to the camera control, I get the error:

Logger: homeassistant.components.automation.toggle_cam
Source: components/automation/__init__.py:717
integration: Automation (documentation, issues)

While executing automation automation.toggle_cam
Full Error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 717, in async_trigger
    return await self.action_script.async_run(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        variables, trigger_context, started_action
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1836, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
    self._handle_exception(
    ~~~~~~~~~~~~~~~~~~~~~~^
        ex, continue_on_error, self._log_exceptions or log_exceptions
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 719, in _async_step_choose
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 636, in _async_run_script
    result = await self._async_run_long_action(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1836, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
    self._handle_exception(
    ~~~~~~~~~~~~~~~~~~~~~~^
        ex, continue_on_error, self._log_exceptions or log_exceptions
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1012, in _async_step_call_service
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 877, in entity_service_call
    raise result from None
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1624, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 924, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 646, in async_turn_off
    await self.hass.async_add_executor_job(self.turn_off)
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 642, in turn_off
    raise NotImplementedError
NotImplementedError
  1. Does this error make sense? I am not familiar with Python by reading the docs suggests that this due to a class not properly extending a base class (???)
  2. Has anyone been able to get this feature working?
  3. Can anyone clarify whether the horse that I am flogging is dead or alive?

Are you sure you’re on the latest Frigate integration version? Are you sure that you are using the camera entity from the Frigate integration?

That’s for replying so quickly @crzynik.

I am using v5.6.0 of the integration, which I assume is the most recent, i generally update whenever I see a notification.

I only have this camera entity so can only assume that I am using the camera from the Frigate integration.

Are you aware of anything that I can do to help debug?

That is quite old Release v5.10.0 · blakeblackshear/frigate-hass-integration · GitHub

HACS! Of course. Frigate is my only HACS integration and I had completely forgotten so.

v5.10.0 has it working perfectly. I’m just trawling back through the release notes now to see what I’ve been missing.

@crzynik, i cannot thank you enough for your speedy response. Good man.