Custom_component and custom_platform Camera

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

  • hxxps://
  • hxxps://

and saved them like this:

| |
| —ccamera
| (renamed
| (i just renamed the DOMAIN to: ‘ccamera’)

then i added the following entry to my configuration.yaml:


  • 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 line 368

everything works just fine using the original build-in components like this:


  • platform: mjpeg
    mjpeg_url: ‘EXAMPLE_URL’

ALSO: in, 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. =)

I believe get_entity was introduced in 0.62. Do you have 0.62 installed, or do you have an older version installed and then download the camera component from github?

1 Like

Jesus, yes that was indeed the problem. Also the in order to import classes from custom_components, the line needs to be changed to:

from custom_components.ccamera import MyClass

instead of the more obvious approach:

from homeassistant.custom_components.ccamera import MyClass

Thank you very much =)