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
- Validated the JSON syntax - it’s valid
- Verified the file location is correct
- The manifest clearly contains the
codeowners
field
Repository
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!