Setup failed for Custom Component: Integration not found

I am certain I am missing something silly, but:

❯ cat configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

lupt:
  url: "https://www.google.com"
❯ find custom_components/
custom_components/
custom_components/lupt
custom_components/lupt/__init__.py
custom_components/lupt/manifest.json
custom_components/lupt/const.py
custom_components/lupt/__pycache__
❯ cat custom_components/lupt/manifest.json
{
  "codeowners": ["@sshaikh"],
  "config_flow": false,
  "dependencies": [],
  "documentation": "https://github.com/sshaikh/homeassistant-lupt",
  "domain": "lupt",
  "iot_class": "assumed_state",
  "name": "LUPT",
  "requirements": [],
  "version": "1.0.0"
}

and yet:

❯ hass -c .
2021-05-24 18:39:42 ERROR (MainThread) [homeassistant.setup] Setup failed for lupt: Integration not found.

Fwiw while testing I also see this:

ERROR    homeassistant.loader:loader.py:794 No 'version' key in the manifest file for custom integration 'lupt'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'lupt'

Which is clearly a lie as I have a version key. The forums suggest this may be because of a mismatch between my domain and sub directory, but even I’ve managed to get a four letter string right.

Any tips? I’ve also tried the minimal hello_state example from https://developers.home-assistant.io/docs/creating_component_index and no luck there either.

It turns out that pytest-homeassistant-custom-component conflicts with home assistant somehow. Using separate venvs for running HA and testing my component did the trick.

Although the testing is still complaining about the missing key, the same code passes fine when running in prod.

Hi Shak,

I’m facing exactly the same issue after upgrading HA to 2021.12.10. My custom components worked without problems before. I also double checked manifest.json to contain the version key.

I see you solved the issue by using separate venvs. What does that exactly mean? How can I achieve this?

Thanks in advance,
Fred

Hello Fred,

I’ve got the same issue. Were you able to find a solution?

Thank you,

Jan