Add Eve Online integration#168143
Conversation
Adds an Eve Online integration using OAuth2 (CCP ESI API) that provides three sensor entities per character: - Status: online/offline (ENUM sensor with translated states) - Wallet balance: ISK balance (MEASUREMENT sensor, 2 decimal precision) - Location: current solar system name Uses a single DataUpdateCoordinator polling at 60-second intervals. Optional endpoints (wallet, location) degrade gracefully — the coordinator only fails hard when the character online status endpoint is unavailable. Required OAuth2 scopes: - esi-location.read_location.v1 - esi-location.read_online.v1 - esi-wallet.read_character_wallet.v1
- Strip to 3 sensors: wallet_balance (primary), location, ship - Remove PARALLEL_UPDATES (Silver-level) - Remove exception translations and icons.json (Gold-level) - Remove online sensor (would require binary_sensor platform) - Add ship sensor with esi-location.read_ship_type.v1 scope - Mark all Bronze quality scale rules as done
There was a problem hiding this comment.
Pull request overview
Adds a new Home Assistant eveonline integration that authenticates via OAuth2 (EVE SSO / CCP ESI) and exposes character wallet/location/ship as sensors.
Changes:
- Introduces the
eveonlineintegration (config flow, application credentials support, coordinator, entities, sensors, and translations). - Adds a full test suite for config flow, setup/unload behavior, coordinator/auth helpers, and sensor snapshots.
- Registers the integration in generated metadata and adds the
python-eveonline==0.4.0dependency to requirements files.
Reviewed changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/eveonline/__init__.py |
Sets up OAuth2 session, client, coordinator, and forwards sensor platform setup. |
homeassistant/components/eveonline/api.py |
Adds config-entry-bound auth helper for the upstream client. |
homeassistant/components/eveonline/application_credentials.py |
Declares the EVE SSO authorization server endpoints for Application Credentials. |
homeassistant/components/eveonline/config_flow.py |
Implements OAuth2 config flow and derives character identity from the JWT access token. |
homeassistant/components/eveonline/const.py |
Defines domain constants, OAuth endpoints, and required scopes. |
homeassistant/components/eveonline/coordinator.py |
Polls wallet/location/ship via a DataUpdateCoordinator, treating wallet as the primary endpoint. |
homeassistant/components/eveonline/entity.py |
Provides shared device/unique-id behavior for character entities. |
homeassistant/components/eveonline/sensor.py |
Adds three sensor entities backed by coordinator data. |
homeassistant/components/eveonline/strings.json |
Adds config flow and entity name strings. |
homeassistant/components/eveonline/manifest.json |
Declares the new integration and dependency. |
homeassistant/components/eveonline/quality_scale.yaml |
Sets initial quality scale statuses for the new integration. |
tests/components/eveonline/* + snapshots |
Adds fixtures and tests for config flow, setup, auth helper, and sensor behavior. |
requirements_all.txt / requirements_test_all.txt |
Adds python-eveonline==0.4.0. |
homeassistant/generated/* |
Registers the new integration for config flows/application credentials/integrations metadata. |
CODEOWNERS |
Assigns ownership for the new integration and its tests. |
…cale - Add freezer.tick(61) in test_sensor_wallet_updated so the coordinator update interval is exceeded before firing the time changed event - Add PR links to brands and docs quality scale entries to clarify that both PRs are already submitted
- Combine solar system and ship type resolve_names calls into one API call for efficiency - Show ship type name (e.g. 'Flycatcher') instead of the player-assigned ship name (e.g. 'i.probe')
async_unload_entry is implemented and tested in test_init.py
…en-unavailable as done - integration-owner: codeowners already set in manifest.json - entity-unavailable: CoordinatorEntity handles this automatically - log-when-unavailable: DataUpdateCoordinator logs this automatically
- test_sensor_location_unavailable_when_endpoint_fails -> test_sensor_location_shows_unknown_when_endpoint_fails - test_sensor_ship_unavailable_when_endpoint_fails -> test_sensor_ship_shows_unknown_when_endpoint_fails
erwindouna
left a comment
There was a problem hiding this comment.
Thanks for adding a new integration, @ronaldvdmeer. Here's an initial review.
…onUnavailableError, recovery test
erwindouna
left a comment
There was a problem hiding this comment.
I think you're progressing very well and we're almost nearing completion here, if you'd ask me. Just a few minor details. :)
Per review by erwindouna: reuse result rather than introducing result2/state2 in tests that run two flows sequentially.
Per review by erwindouna: use the STATE_UNAVAILABLE constant instead of the hardcoded string literal.
Per review by erwindouna: use the STATE_UNKNOWN constant instead of the hardcoded string literal.
- model: 'Character' — consistent label for all character devices - configuration_url: evewho.com profile link for the character
|
I noticed the |
Thanks a lot, really appreciate that. Glad to hear we’re getting close now. I’ve taken care of the remaining minor details so we can hopefully get this over the finish line soon. 👍 |
OAuth2-only integration; the EVE SSO token exchange is the only pre-configure step possible. No traditional connectivity test can be performed before the OAuth round-trip completes.
|
The PR was still green on the 26 of April, so this looks more like newer core/CI behavior exposing the missing reauth path than a new review requirement. The integration already raises |
|
I’ve now implemented the missing reauth path instead of broadening the scope: the OAuth flow now supports That matches the existing HA OAuth pattern and fixes the current failure mode directly, since the integration was already raising |
|
@erwindouna See my 2 comments and the commit. Triggered by a dev branch merge. #168143 (comment) and #168143 (comment) and as an result: 50e32ce |
Proposed change
Adds a new Eve Online integration using OAuth2 (CCP ESI API). The integration provides three sensor entities per character:
Uses a single
DataUpdateCoordinatorpolling at 60-second intervals. The wallet endpoint is the primary — a failure marks all entities unavailable. Location and ship failures are logged at debug level only.Required OAuth2 scopes:
esi-location.read_location.v1esi-location.read_ship_type.v1esi-wallet.read_character_wallet.v1Related PRs:
Dependency libary changelog: https://github.com/ronaldvdmeer/python-eveonline/releases/tag/v0.4.0
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.