okay, i want to overhaul the camera component and make a custom_platform for it.
but not in the acutal code, i want to utilize the custom_component and custom_platform features.
i started by simply copying the exiting
- __init__.py hxxps://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/camera/__init__.py
- _mjpeg.py hxxps://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/camera/mjpeg.py
and saved them like this:
.homeassistant:
±–custom_components
| |
| —ccamera
| ------mymjpeg.py (renamed -mjpeg.py)
| ------__init__.py (i just renamed the DOMAIN to: ‘ccamera’)
then i added the following entry to my configuration.yaml:
ccamera:
- platform: mymjpeg
mjpeg_url: ‘EXAMPLE_URL’
no errors launching just homeassistant. however once i open the frontend and want to see the camera, the following error occurs:
AttributeError: ‘EntityComponent’ object has no attribute ‘get_entity’ in __init__.py line 368
everything works just fine using the original build-in components like this:
camera:
- platform: mjpeg
mjpeg_url: ‘EXAMPLE_URL’
ALSO: in -mymjpeg.py, line 20 imports from the built-in component rather the custom one ‘ccamera’. trying to change it results in ‘no module found’.
any help appreciated. =)