Skip to content

Add Data Grand Lyon integration#167946

Merged
joostlek merged 37 commits intohome-assistant:devfrom
Crocmagnon:devel/Crocmagnon/tcl
May 7, 2026
Merged

Add Data Grand Lyon integration#167946
joostlek merged 37 commits intohome-assistant:devfrom
Crocmagnon:devel/Crocmagnon/tcl

Conversation

@Crocmagnon
Copy link
Copy Markdown
Contributor

@Crocmagnon Crocmagnon commented Apr 10, 2026

Proposed change

New integration for Data Grand Lyon open data platform. Supports config subentries for transit stops.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist (documentation TODO)
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Enregistrement d'écran_20260411_104705.webm
Enregistrement d'écran_20260411_104606.webm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new tcl Home Assistant integration for Lyon (TCL) public transit and Vélo'v bike-sharing, including config flows with subentries and sensor entities backed by a coordinator.

Changes:

  • Adds TCL integration implementation (config flow + coordinator + sensor platform + translations/manifest/quality scale).
  • Adds automated tests for the integration’s config flow and subentry flows.
  • Registers the integration in generated indices and adds the upstream dependency to requirements.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tests/components/tcl/test_config_flow.py Adds config flow + subentry flow tests for TCL integration.
tests/components/tcl/conftest.py Adds shared fixture to patch async_setup_entry during tests.
tests/components/tcl/init.py Adds tests package marker for TCL.
requirements_test_all.txt Adds transports-commun-lyon to the test requirements set.
requirements_all.txt Adds transports-commun-lyon to the runtime requirements set.
homeassistant/generated/integrations.json Registers the new tcl integration for discovery/metadata.
homeassistant/generated/config_flows.py Registers tcl as supporting config flows.
homeassistant/components/tcl/strings.json Adds UI strings for config flow, subentries, and entity translations.
homeassistant/components/tcl/sensor.py Implements stop and Vélo'v sensors using the coordinator pattern.
homeassistant/components/tcl/quality_scale.yaml Declares current quality-scale rule status for the new integration.
homeassistant/components/tcl/manifest.json Adds manifest metadata and pins dependency version.
homeassistant/components/tcl/coordinator.py Adds coordinator to fetch/merge passages and fetch station status.
homeassistant/components/tcl/const.py Defines constants for keys/subentry types and passage count.
homeassistant/components/tcl/config_flow.py Implements main config flow, reauth, and subentry flows.
homeassistant/components/tcl/init.py Wires up coordinator, update listener, and forwards platform setup.
CODEOWNERS Assigns ownership for new integration code and tests.

Comment thread homeassistant/components/tcl/config_flow.py Outdated
Comment thread homeassistant/components/tcl/config_flow.py Outdated
Comment thread homeassistant/components/data_grandlyon/config_flow.py Outdated
Comment thread homeassistant/components/data_grandlyon/config_flow.py Outdated
Comment thread homeassistant/components/tcl/sensor.py Outdated
Comment thread homeassistant/components/tcl/coordinator.py Outdated
Comment thread homeassistant/components/tcl/coordinator.py Outdated
Comment thread homeassistant/components/data_grandlyon/quality_scale.yaml Outdated
Comment thread homeassistant/components/tcl/quality_scale.yaml Outdated
Comment thread homeassistant/components/tcl/quality_scale.yaml Outdated
Copilot AI review requested due to automatic review settings April 10, 2026 22:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (1)

homeassistant/components/tcl/manifest.json:1

  • The manifest includes several empty fields (dependencies, homekit, ssdp, zeroconf). If these are not intentionally required by hassfest for this integration, consider removing them to reduce noise and keep the manifest focused on meaningful declarations.
{

Comment thread homeassistant/components/data_grandlyon/config_flow.py Outdated
Comment thread homeassistant/components/data_grandlyon/coordinator.py Outdated
Comment thread homeassistant/components/tcl/coordinator.py Outdated
Comment thread homeassistant/components/tcl/config_flow.py Outdated
Comment thread homeassistant/components/tcl/config_flow.py Outdated
Comment thread homeassistant/components/tcl/coordinator.py Outdated
Comment thread homeassistant/components/data_grand_lyon/quality_scale.yaml
Comment thread homeassistant/components/tcl/quality_scale.yaml Outdated
Comment thread tests/components/tcl/conftest.py
@Crocmagnon Crocmagnon marked this pull request as draft April 10, 2026 22:31
Copilot AI review requested due to automatic review settings April 10, 2026 22:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 6 comments.

Comment thread homeassistant/components/tcl/config_flow.py Outdated
Comment thread homeassistant/components/tcl/config_flow.py Outdated
Comment thread homeassistant/components/tcl/config_flow.py Outdated
Comment thread homeassistant/components/tcl/sensor.py Outdated
Comment thread homeassistant/components/tcl/manifest.json Outdated
Comment thread homeassistant/components/tcl/manifest.json Outdated
Copilot AI review requested due to automatic review settings April 10, 2026 22:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.

Comment thread homeassistant/components/tcl/coordinator.py Outdated
Comment thread homeassistant/components/tcl/sensor.py Outdated
Comment thread homeassistant/components/tcl/sensor.py Outdated
Copilot AI review requested due to automatic review settings April 10, 2026 22:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 4 comments.

Comment thread homeassistant/components/tcl/coordinator.py Outdated
Comment thread homeassistant/components/tcl/sensor.py Outdated
Comment thread homeassistant/components/data_grand_lyon/quality_scale.yaml
Comment thread homeassistant/components/data_grandlyon/sensor.py Outdated
Copilot AI review requested due to automatic review settings April 10, 2026 23:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/tcl/coordinator.py Outdated
Comment thread tests/components/tcl/test_sensor.py Outdated
Copilot AI review requested due to automatic review settings April 11, 2026 08:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/data_grand_lyon/config_flow.py
Comment thread homeassistant/components/tcl/sensor.py Outdated
Copilot AI review requested due to automatic review settings May 5, 2026 17:16
@Crocmagnon
Copy link
Copy Markdown
Contributor Author

thank you for your precious feedback, I'm still learning the ropes but things start making more and more sense.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 21 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/data_grand_lyon/config_flow.py
Comment thread homeassistant/components/data_grand_lyon/manifest.json
@Crocmagnon

This comment was marked as resolved.

@Crocmagnon Crocmagnon marked this pull request as ready for review May 5, 2026 18:40
Copilot AI review requested due to automatic review settings May 5, 2026 18:40
@home-assistant home-assistant Bot requested a review from joostlek May 5, 2026 18:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 21 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/data_grand_lyon/config_flow.py
Comment thread homeassistant/components/data_grand_lyon/sensor.py
Comment thread homeassistant/components/data_grandlyon/manifest.json Outdated
Comment thread tests/components/data_grand_lyon/test_config_flow.py Outdated
@joostlek
Copy link
Copy Markdown
Member

joostlek commented May 5, 2026

I think that's my last question, rest looks good

@joostlek
Copy link
Copy Markdown
Member

joostlek commented May 5, 2026

oh and message me on discord so we can add you to the right channels :)

Copilot AI review requested due to automatic review settings May 5, 2026 20:03
@Crocmagnon
Copy link
Copy Markdown
Contributor Author

I renamed "passage" to "departure" to be more English friendly. I'll keep the library as-is to stick to the API.
I also added an friendly icon to the direction sensors.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Crocmagnon

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants