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

Fixing hassfest validation #450

Merged
merged 4 commits into from
Jan 24, 2025
Merged

Fixing hassfest validation #450

merged 4 commits into from
Jan 24, 2025

Conversation

srkoster
Copy link
Contributor

I noticed that my previous PRs failed the hassfest validation on existing code. This change should bring that code in line with the hassfest checks.

Error: R] [DEPENDENCIES] Using component tag but it's not in 'dependencies' or 'after_dependencies'
  • Fixed in manifest.json by adding tag to after_dependencies. It was triggered because of from homeassistant.components.tag import async_scan_tag in __init__.py. Added the after_dependencies makes sure that the home assistant tag component is loaded before the Dahua integration.
  • Also reordered the fields in manifest.json as "Manifest keys should be sorted: domain, name, then alphabetical order"
Error: R] [SERVICES] Service set_infrared_mode has a field mode with no name and is not in the translations file
Error: R] [SERVICES] Service set_infrared_mode has a field brightness with no name and is not in the translations file
Error: R] [SERVICES] Service set_video_profile_mode has a field mode with no name and is not in the translations file
Error: R] [SERVICES] Service set_video_in_day_night_mode has a field config_type with no name and is not in the translations file
Error: R] [SERVICES] Service set_video_in_day_night_mode has a field mode with no name and is not in the translations file
Error: R] [SERVICES] Service set_record_mode has a field mode with no name and is not in the translations file
  • Fixed in services.yaml by adding a name attribute to the mentioned fields.
Warning: G] [CONFIG_SCHEMA] Integrations which implement 'async_setup' or 'setup' must define either 'CONFIG_SCHEMA', 'PLATFORM_SCHEMA' or 'PLATFORM_SCHEMA_BASE'. If the integration has no configuration parameters, can only be set up from platforms or can only be set up from config entries, one of the helpers cv.empty_config_schema, cv.platform_only_config_schema or cv.config_entry_only_config_schema can be used.
  • Fixed in __init__.py by removing async_setup as its not implemented and YAML setup is not supported

@rroller rroller merged commit e0a12f0 into rroller:main Jan 24, 2025
3 checks passed
@rroller
Copy link
Owner

rroller commented Jan 24, 2025

Thanks again!

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