The netatmo welcome camera component for homeassistant works well, but it would be great to add support for suspend and resume monitoring, like a switch.
would be great to be able to automate camera on or off based on time, or presence information from devices and so on.
Have solved this issue now with camera.disable_motion_detection / camera.enable_motion_detection. Does exactly what I looked for - maybe also helpful for you.
When I call the service camera.disable_motion_detection, I got an error 'Failed to call service"
Here are the logs:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/camera/__init__.py:444
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 12:14:50 AM (1 occurrences)
Last logged: 12:14:50 AM
[547759159520]
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 593, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 630, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 448, in async_disable_motion_detection
await self.hass.async_add_executor_job(self.disable_motion_detection)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 444, in disable_motion_detection
raise NotImplementedError()
NotImplementedError
I have no idea what is this error. Can anyone help me to fix it ?
Thanks in advance,
Regards,
lolongan
Actually there is no such thing for Netatmo cameras. You can only turn them off completely.
That’s the reason it was removed about a year ago.
Just use camera.turn_off instead.