Skip to content

2025 Fall update#283

Open
ludeeus wants to merge 23 commits intomainfrom
2025update
Open

2025 Fall update#283
ludeeus wants to merge 23 commits intomainfrom
2025update

Conversation

@ludeeus
Copy link
Owner

@ludeeus ludeeus commented Oct 17, 2025

No description provided.

…n keys; enhance error handling and add reconfiguration support in config flow
…sary constructor parameters; streamline entity initialization
@ludeeus ludeeus marked this pull request as ready for review October 17, 2025 13:26
Copilot AI review requested due to automatic review settings October 17, 2025 13:26
Copy link
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

This PR modernizes the integration blueprint and development workflow for a 2025 update, aligning with current Home Assistant and tooling practices.

  • Adopt uv for dependency management and Ruff for linting/formatting (with pre-commit and CI updates).
  • Introduce config flow reconfiguration and diagnostics, and improve error handling with translatable exceptions.
  • Streamline scripts with Scripts to Rule Them All and update documentation accordingly.

Reviewed Changes

Copilot reviewed 29 out of 31 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/update Adds update script that re-runs bootstrap after pull.
scripts/setup Switches to sh and delegates to bootstrap.
scripts/motd Adds a development environment MOTD and exposes scripts/help.
scripts/lint-check Adds non-mutating lint check via uv+ruff for CI.
scripts/lint Runs Ruff format and check with uv and better messages.
scripts/help Adds a helper to list scripts and descriptions.
scripts/bootstrap Installs uv (via pipx), deps via uv, and pre-commit hooks.
pyproject.toml Moves Ruff config to pyproject and sets Python 3.13.
hacs.json Updates minimum Home Assistant version.
translations/en.json Adds entity names and exception messages; reconfigure texts.
switch.py Adds translated errors, logging, and translation_key for entity.
sensor.py Uses translation_key for entity; simplifies init.
entity.py Centralizes entity init with entity_description and unique_id scheme.
diagnostics.py Adds config entry diagnostics endpoint.
coordinator.py Adds translated exceptions and docs improvements.
config_flow.py Adds reconfigure step and centralizes error mapping.
binary_sensor.py Uses translation_key and simplifies init.
api.py Switches to asyncio.timeout and removes async_timeout; minor cleanup.
config/configuration.yaml Adds logger filters for common noisy logs.
README.md Major documentation overhaul aligning with new tooling and features.
CONTRIBUTING.md Updates workflow steps; switches to Ruff and scripts.
.ruff.toml Removes redundant Ruff config (moved to pyproject).
.pre-commit-config.yaml Adds local ruff hooks using system environment.
.github/workflows/validate.yml Minor wording update in comments.
.github/workflows/lint.yml Uses setup-uv and scripts for linting in CI.
.github/pull_request_template.md Adds a PR template.
.github/ISSUE_TEMPLATE/* Improves issue templates with labels and fields.
.devcontainer.json Updates container name and adds MOTD on start.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +97 to 100
except Exception as exception:
msg = f"Something really wrong happened! - {exception}"
raise IntegrationBlueprintApiClientError(
msg,
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Catching Exception is flagged by Ruff (BLE001) under your configuration (select = ["ALL"]). Either narrow the exception handling to expected errors or add an inline suppression to keep the intent explicit.

Copilot uses AI. Check for mistakes.
"""Get information from the API."""
try:
async with async_timeout.timeout(10):
async with asyncio.timeout(10):
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Since this uses asyncio.timeout, ensure the corresponding except clause catches asyncio.TimeoutError (not just the built-in TimeoutError) so timeouts are handled reliably across Python versions. Update the timeout except handler accordingly.

Copilot uses AI. Check for mistakes.
ludeeus and others added 4 commits October 18, 2025 20:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jpawlowski
Copy link

I wonder if this will make it easier to run HA versions >2025.7 for development inside the devcontainer? It seems the new external dependencies are really hard to manage without HA OS.

@ludeeus
Copy link
Owner Author

ludeeus commented Nov 26, 2025

Not yet, which is why this is still open, it is not working.

@jpawlowski
Copy link

I was able to takle it at http://github.com/jpawlowski/hass.tibber_prices but not sure if that's the way it is supposed to be. I could create a separate PR to make some suggestions if you want?

@ludeeus
Copy link
Owner Author

ludeeus commented Nov 26, 2025

please do 👍

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

Labels

None yet

3 participants