Asking here because I’m finding it hard to find definitive information about this:
Is it not possible to set up cameras via YAML in current Home Assistant?
I’ve been trying to do this, but am getting somewhat cryptic error messages that are leading me to suspect this might be true.
Background:
I’m trying to keep the configuration for exposing my doorbell to HomeKit ‘together’.
It’s just a simple button, so I need to make a ‘dummy’ still image ‘camera’ to create HomeKit camera with a doorbell feature.
Some of this configuration must (I think) be done in YAML, so I’d like to configure the ‘camera’ in YAML near the rest of the configuration.
First I tried a local_file camera, as posts here suggest:
In YAML:
camera:
- platform: local_file
file_path: http://control.lan:8123/local/doorbell.jpeg
name: Doorbell Image
No errors in the UI - but also no camera in Home Assistant.
But! In the logs:
ERROR (MainThread) [homeassistant.components.camera] The local_file platform for the camera integration does not support platform setup. Please remove it from your config.
So I tried a generic camera, as some posts here suggest:
In YAML:
camera:
- platform: generic
still_image_url: http://control.lan:8123/local/doorbell.jpeg
name: Doorbell Image
This time there is an error notification in the Home Assistant UI:
It's not possible to configure generic camera by adding platform: generic to the camera configuration. Please check the documentation for more information on how to set up this integration.
To resolve this:
Remove platform: generic occurrences from the camera: configuration in your YAML configuration file.
Restart Home Assistant.
Example that should be removed:
camera:
- platform: generic