Skip to content

Conversation

@WickedGhost
Copy link
Owner

This pull request introduces an optional integration with the Airlabs Flight API, allowing users to fetch detailed flight information in addition to the existing Avinor data. It adds a new service for retrieving flight details, updates configuration options and documentation, and includes supporting code and test stubs for improved maintainability and usability.

Airlabs Flight API Integration:

  • Added AirlabsApiClient class to api.py for fetching detailed flight information from the Airlabs API, with error handling and parameter validation.
  • Introduced a new service get_flight_details (with schema and documentation in services.yaml) to fetch flight details using the Airlabs API, supporting both configured and per-call API keys. [1] [2]
  • Registered and removed the service dynamically based on integration setup/unload, ensuring clean resource management. [1] [2]

Configuration and User Experience:

  • Updated configuration flow to allow users to optionally provide an Airlabs API key during setup or options editing. [1] [2] [3] [4]
  • Extended const.py with new constants for Airlabs integration and service naming. [1] [2]

Documentation and Metadata:

  • Updated README.md with instructions for the new Airlabs flight details feature, including service usage examples and configuration guidance. [1] [2] [3]
  • Bumped version to 1.0.8 in manifest.json to reflect the new feature.

Testing Support:

  • Added tests/conftest.py to provide stubs for Home Assistant modules, enabling unit tests to run outside a full Home Assistant environment.
  • Updated API test imports to include the new AirlabsApiClient.

@WickedGhost WickedGhost merged commit f84c450 into main Dec 30, 2025
3 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