Skip to content

Conversation

@heyrichard17
Copy link
Contributor

In a default install via HACS, the schema.json file does not get installed in Home Assistant.

So custom_components/battery_notes/data/library.json shows a warning Unable to load schema from '/config/schema.json': ENOENT: no such file or directory, open '/config/schema.json'.

This fixes it by moving the schema.json file to the same directory as library.json.

Also, had to adjust a couple of workflow yml files to reflect this file move accordingly.

…folder so that it can be referenced in a default HACS install
@andrew-codechimp
Copy link
Owner

andrew-codechimp commented Jan 27, 2024

I didn't notice this warning, thanks for the spot.
I will test this on a clone repo I have just for GH Actions as they can be awkward.
HACS persists the data directory to allow for user library's so I will maybe move this one level down to battery_notes so it's still in the custom component but can be updated via HACS.
I'll contribute to this PR once I have it tested then merge.

This comment was marked as outdated.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge this in as part of the next release. A lot tidier thanks.

@andrew-codechimp andrew-codechimp merged commit 413f1f2 into andrew-codechimp:main Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants