Custom components not working since 0.94.2

Since the upgrade of HA to 0.94.2 I get the error: Custom component not found in the config check.
This only happens when I make changes to the custom component python file. If I leave it alone, this message doesn’t appear.

What is changed since this release?
I’m aware of the breaking changes of the 0.9x releases for custom components.
My folder structure, I think, is correct i.e: custom_components\ads_custom\sensor.py
I also have a manifest file in that same directory.
When I copy the code from github of the sensor.py (exact copy-paste), it still gives me the custom_component not found error.
What am I missing here?

How are you copying it? are you using the “raw” button then copying it from there (correct way) or from the github code box (incorrect way)?

Which custom component are you using? Can you post a link to it?

I am copying the code as RAW.
@123 : The component doesn’t matter. I’ve tested it with lgwebos, ads, mqtt climate, … all the same: ‘component not found’.

In the meantime my HA runs very unstable. Since 94.2 I encounter memory leaks. I’ve already disabled all custom components, but the problem persists. Maybe this has to do with one and other.

If this is happening to any and all custom components then something must be amiss with your procedures. I’m running two custom components with 0.94.2 without issues. One of them (a customized version of MQTT HVAC) is my handiwork and Home Assistant has no problem detecting it.


EDIT

Just a real wild guess but could it be a file-permissions issue? The files are created using an account that prevents access to Home Assistant?

That’s good.

Also, the new custom component format has changed a bit more then it even did before.

In the component folder there should typically now contain three files - an __init__.py file, a manifest.json file and another file based on the type of component it is (sensor.py, switch.py, etc).

If you don’t have all three of those then you need to go back to the github repo and make sure that you aren’t missing some files. If the github repo doesn’t provide those files then the author might need to update the component to follow the requirements of the “great migration”.

I have seen code (I think…) that includes the (i.e.) sensor,py file contents in the __init__.py file so then that file wouldn’t be necessary but generally that is the required new format of custom component directories.

Just to muddy the waters, I’m not using an __init__.py file and my custom component works. :man_shrugging:

In config/custom_components/my_mqtt it contains:
climate.py
manifest.json

In my case, adding a blank __init__.py (or a one-line comment) made no difference. Go figure.

My guess is because its dependency is mqtt and so it simply supplants mqtt's climate file (and leverages everything else belonging to the mqtt integration).

Well

After much searching and testing I’ve come to the conclusion that somehow my configuration got corrupted.
Formatted the SD card, installed HASSIO and configured everything back line by line… it works.
Strange things happen (No stranger would it be)

I’m having the same issue here but I’m unwilling to reformat and start over as per @gijbelsy (just yet). My concern is that others are going to have the same problem with my HACS-enabled custom component.

Nothing in the logs suggests an issue. I’ll try a few things and will report back.

UI config check is not “great” for custom_components (Often gives false negatives).

When downloading a custom_component after 0.94:

  • in the directory for that integration you need at least 2(3) files.
    • A _init__.py file (This can be blank/contain only a docstring if the integration only are a platfrom).
    • A manifest.json file.
    • The platform files (sensor/switch and so on.)
  • After you have downloaded them and placed them in the correct directory, restart HA.
  • After the restart add it to your config.
  • Run config_check.
  • Restart HA.

It will not be perfect everytime, but this way have a higher success rate.

Well @MartyTremblay I wasn’t planning either. But besides my home assistant not recognizing custom components, It froze every hour.
Disabled almost all of my config and it still happened. I took the short cut and started over.