grep -q "refs/tags/$TAG" matched substrings, so v0.27.0b0
would block release of v0.27.0. Changed to "refs/tags/${TAG}$"
to require exact end-of-line match.
Major restructuring of the scripts/ directory with consistent output
formatting, improved organization, and stricter error handling.
Breaking Changes:
- Updated development environment to Home Assistant 2025.7+
- Removed Python 3.12 compatibility (HA 2025.7+ requires Python 3.13)
- Updated all HA core requirements from 2025.7 requirement files
- Added new dependencies: python-multipart, uv (for faster package management)
- Updated GitHub Actions workflows to use Python 3.13
Changes:
- Created centralized output library (scripts/.lib/output.sh)
- Unified color codes and Unicode symbols
- Consistent formatting functions (log_header, log_success, log_error, etc.)
- Support for embedded formatting codes (${BOLD}, ${GREEN}, etc.)
- Reorganized into logical subdirectories:
- scripts/setup/ - Setup and maintenance scripts
- bootstrap: Install/update dependencies (used in CI/CD)
- setup: Full DevContainer setup (pyright, copilot, HACS)
- reset: Reset config/ directory to fresh state (NEW)
- sync-hacs: Sync HACS integrations
- scripts/release/ - Release management scripts
- prepare: Version bump and tagging
- suggest-version: Semantic version suggestion
- generate-notes: Release notes generation
- check-if-released: Check release status
- hassfest: Local integration validation
- Updated all scripts with:
- set -euo pipefail for stricter error handling
- Consistent SCRIPT_DIR pattern for reliable sourcing
- Professional output with colors and emojis
- Unified styling across all 17 scripts
- Removed redundant scripts:
- scripts/update (was just wrapper around bootstrap)
- scripts/json_schemas/ (moved to schemas/json/)
- Enhanced clean script:
- Improved artifact cleanup
- Better handling of accidental package installations
- Hints for reset and deep clean options
- New reset script features:
- Standard mode: Keep configuration.yaml
- Full mode (--full): Reset configuration.yaml from git
- Automatic re-setup after reset
- Updated documentation:
- AGENTS.md: Updated script references and workflow guidance
- docs/development/: Updated all references to new script structure
Impact: Development environment now requires Python 3.13 and Home Assistant
2025.7+. Developers get consistent, professional script output with better
error handling and logical organization. Single source of truth for styling
makes future updates trivial.
Set up pytest with Home Assistant support and created 6 tests for
midnight-crossing period logic (5 unit tests + 1 integration test).
Added pytest configuration, test dependencies, test runner script
(./scripts/test), and comprehensive tests for group_periods_by_day()
and midnight turnover consistency.
All tests pass in 0.12s.
Impact: Provides regression testing for midnight-crossing period bugs.
Tests validate periods remain visible across midnight turnover.
Added scripts to install HACS in DevContainer for testing the
integration alongside other HACS components.
Changes:
- scripts/setup: Automatically install HACS and create symlink
- scripts/sync-hacs: Sync HACS-installed integrations via symlinks
- .gitignore: Ignore custom_components/* except tibber_prices
HACS installs to config/custom_components/, symlinks in
custom_components/ make integrations visible to Home Assistant.
Impact: Developers can test with other integrations. No user changes.
HACS automatically displays the version number before release titles,
causing duplication when version tags are included in the title.
Changes:
- scripts/generate-release-notes: All backends now generate intelligent
titles without version prefix (git-cliff, manual, and copilot)
- scripts/generate-release-notes: Added smart title generation based on
commit analysis (feat/fix counts) for git-cliff and manual backends
- scripts/generate-release-notes: Unified section headers to use ### (H3)
instead of ## (H2) for consistency across all backends
- scripts/generate-release-notes: Auto-update feature now uses extracted
title without prepending version tag
- .github/workflows/release.yml: Extract title directly from generated
release notes (first line with "# ") instead of manual construction
- .github/workflows/release.yml: Removed redundant "Generate release title"
step
Before (HACS): v0.9.0: v0.9.0 - New Features
After (HACS): v0.9.0: Multi-Home Support & Diagnostic Sensors
Impact: Release titles in HACS are now cleaner with single version display
and more descriptive titles generated intelligently from commit content.
All three backends (copilot, git-cliff, manual) produce consistent output
with H1 title followed by H3 sections.
Home Assistant's hassfest validation requires config flows to be defined
in a file named config_flow.py (not a package directory).
Changes:
- Renamed custom_components/tibber_prices/config_flow/ → config_flow_handlers/
- Created config_flow.py as bridge file re-exporting from config_flow_handlers/
- Updated all import paths across 5 files (user_flow, options_flow, subentry_flow, etc.)
- Added ./scripts/hassfest for local validation (JSON/Python syntax, required files)
- Added ./scripts/clean with three modes (--minimal, normal, --deep)
- Refactored develop/lint/lint-check to use centralized cleanup (DRY principle)
- Updated documentation in AGENTS.md and docs/development/
Technical details:
- Bridge file uses __all__ exports to maintain clean public API
- hassfest script uses ast.parse() for syntax validation (no disk artifacts)
- clean --minimal removes .egg-info only (silent, for automated scripts)
- Dual pip/uv pip compatibility for package uninstallation
Impact: Integration now passes hassfest validation. Local validation available
via ./scripts/hassfest before pushing to GitHub. Cleanup logic centralized and
DRY across all development scripts.
Major improvements to release note generation system:
**AI Model Optimization:**
- Switch from Claude Sonnet 4.5 to Haiku 4.5 (67% cheaper, 50% faster)
- Cost reduced from 1.0 to 0.33 Premium requests per generation
- Generation time reduced from ~30s to ~15s
- Quality maintained through improved prompt engineering
**Improved Prompt Structure:**
- Restructured prompt: instructions first, commit data last
- Added explicit user-feature prioritization rules (sensors > config > developer tools)
- Integrated file change statistics with each commit
- Added file path guidance (custom_components/ = HIGH, scripts/ = LOW)
- Added 3-step decision process with walkthrough example
- Added explicit output constraints to prevent meta-commentary
**Auto-Update Feature:**
- Consolidated improve-release-notes functionality into generate-release-notes
- Automatic detection of existing GitHub releases
- Interactive prompt to update both title and body
- Shows comparison: current title vs. new AI-generated title
**File Statistics Integration:**
- Added --stat --compact-summary to git log
- Shows which files changed in each commit with line counts
- Helps AI quantitatively assess change importance (100+ lines = significant)
- Enables better prioritization of user-facing features
**Testing Results:**
- Generated title: "Price Volatility Analysis & Configuration" (user-focused!)
- Successfully prioritizes user features over developer/CI changes
- No more generic "New Features & Bug Fixes" titles
- Thematic titles that capture main release highlights
Impact: Release note generation is now faster, cheaper, and produces
higher-quality user-focused titles. Single consolidated script handles
both generation and updating existing releases.
Added mandatory validation steps to release workflow:
- Job 1: validate (hassfest + HACS) - runs before release
- Job 2: lint (Ruff check + format) - runs before release
- Job 3: sync-manifest - only runs if validation passes
- Job 4: release-notes - only runs if all previous jobs pass
This ensures no release is created if code doesn't pass validation.
Fixed generate-release-notes script to suppress colored output in CI:
- Added log_info() wrapper that sends output to stderr in CI
- Keeps release notes clean (only markdown, no ANSI codes)
- Local execution still shows colored output for better UX
Impact: Release workflow now fails fast if validation fails. Release
notes are clean without shell output artifacts.
Added intelligent version suggestion system based on Conventional Commits
analysis to support proper semantic versioning.
New scripts:
- check-if-released: Verify if commit exists in any version tag
- Helps decide if legacy migration code is needed
- Shows guidance for breaking changes vs simple migrations
- suggest-version: Analyze commits and suggest next version
- Counts breaking changes, features, and bug fixes
- Applies pre-1.0 rules: breaking→MINOR, feat→MINOR, fix→PATCH
- Applies post-1.0 rules: breaking→MAJOR, feat→MINOR, fix→PATCH
- Checks manifest.json and suggests alternatives (MAJOR/MINOR/PATCH)
- Provides preview and release commands
Updated scripts:
- prepare-release: Now calls suggest-version when no argument provided
- Shows suggested version before prompting
- Maintains manual override capability
Impact: Developers get intelligent version suggestions based on actual
commit content, reducing versioning mistakes and following semver correctly.