Hassfest KeyError: 'codeowners' despite having codeowners in manifest.json

Hassfest KeyError: ‘codeowners’ despite having codeowners in manifest.json

Hi everyone,

I’m trying to validate my custom component using hassfest for HACS submission, but I’m getting a KeyError: 'codeowners' error even though my manifest.json clearly includes the codeowners field.

The Error

Traceback (most recent call last):
  File "/usr/src/homeassistant/script/hassfest/codeowners.py", line 96, in validate
    config.cache["codeowners"] = content = generate_and_validate(integrations, config)
  File "/usr/src/homeassistant/script/hassfest/codeowners.py", line 71, in generate_and_validate
    codeowners = integration.manifest["codeowners"]
KeyError: 'codeowners'

My manifest.json

{
  "domain": "ai_agent_ha",
  "name": "AI Agent HA",
  "codeowners": ["@sbenodiz"],
  "config_flow": true,
  "dependencies": ["http"],
  "documentation": "https://github.com/sbenodiz/ai_agent_ha",
  "iot_class": "cloud_polling",
  "issue_tracker": "https://github.com/sbenodiz/ai_agent_ha/issues",
  "requirements": ["aiohttp"],
  "version": "0.1.0"
}

GitHub Action

I’m using the standard hassfest action:

name: Validate with hassfest

on:
  push:
  pull_request:
  schedule:
    - cron: "0 0 * * *"

jobs:
  validate:
    runs-on: "ubuntu-latest"
    steps:
      - uses: "actions/checkout@v3"
      - uses: home-assistant/actions/hassfest@master

Repository Structure

custom_components/
└── ai_agent_ha/
    ├── __init__.py
    ├── manifest.json
    ├── config_flow.py
    └── [other files...]

What I’ve Tried

  1. Validated the JSON syntax - it’s valid
  2. Verified the file location is correct
  3. The manifest clearly contains the codeowners field

Repository

You can see my full repository here: GitHub - sbenodiz/ai_agent_ha: A Home Assistant custom component that provides an AI-powered agent capable of generating automations based on natural language queries. The agent connects to all entities in your Home Assistant instance and uses OpenAI's or Llama API to translate user requests into valid Home operations including creating automations for you!

Question

Has anyone encountered this issue before? The error suggests hassfest can’t find the codeowners key in the manifest, but it’s clearly there.

Any insights would be greatly appreciated! I need to get hassfest passing to submit this component to HACS.

Thanks in advance!

I have not done any development for HA, but I can read the documentation and it looks like you have done it correctly for codeowners, so no help there, but you seems to be missing integration_type though.

Thanks, you right. I added integration_type, but yes it’s not related to my issue :frowning:
I will wait for other people to comment.