Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved schema.json to fix warning due to location of the file #682

Merged
merged 3 commits into from
Jan 30, 2024
Merged

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.

schema.json Outdated

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
4 checks passed
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