Skip to content

Fix migration error: add missing async_get_options_flow method#26

Merged
Geek-MD merged 3 commits intomainfrom
copilot/fix-migration-error-v1-3-6
Dec 10, 2025
Merged

Fix migration error: add missing async_get_options_flow method#26
Geek-MD merged 3 commits intomainfrom
copilot/fix-migration-error-v1-3-6

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 10, 2025

v1.3.6 introduced a critical regression where existing config entries failed with "Flow handler not found for entry", disabling all counters. The HADailyCounterConfigFlow class was missing the required static method to link to the options flow handler.

Changes

  • config_flow.py: Added async_get_options_flow() static method to properly register the options flow handler
  • manifest.json: Bumped version to 1.3.7
  • release.yaml: Automated changelog extraction from CHANGELOG.md into GitHub releases
  • CHANGELOG.md: Added structured release notes following Keep a Changelog format

Technical Details

Home Assistant's config entry system requires async_get_options_flow() to locate the options flow handler for existing entries:

class HADailyCounterConfigFlow(config_entries.ConfigFlow):
    VERSION = 1
    domain = DOMAIN

    @staticmethod
    def async_get_options_flow(config_entry: ConfigEntry) -> config_entries.OptionsFlow:
        """Get the options flow for this handler."""
        from .options_flow import HADailyCounterOptionsFlow
        return HADailyCounterOptionsFlow(config_entry)

Without this method, HA cannot resolve the flow handler reference, causing all existing entries to appear disabled.

Release Process

The updated workflow now extracts version-specific changelog content and populates GitHub release notes automatically—no manual copy-paste required.

Original prompt

Es necesario lanzar la v1.3.7 para corregir los siguientes problemas

HA indica que existe un error de migración con la v1.3.6, y ninguno de los contadores creados previamente están disponible sino que están deshabilitados.

Esto es lo que aparece en el log, desconozco si se trata de lo mismo, pero te lo entrego para tu análisis

Registrador: homeassistant.config_entries
Fuente: config_entries.py:1081
Ocurrió por primera vez: 11:19:44 (9 ocurrencias)
Última vez registrado: 11:19:44

Flow handler not found for entry Apertura Ventana Dormitorio Baltasar for ha_daily_counter
Flow handler not found for entry Apertura Ventana Dormitorio Begoña for ha_daily_counter
Flow handler not found for entry Apertura Ventana Dormitorio Principal for ha_daily_counter
Flow handler not found for entry Apertura Ventanal Living for ha_daily_counter
Flow handler not found for entry Movimiento Pasillo for ha_daily_counter


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 10, 2025 14:34
Co-authored-by: Geek-MD <25725990+Geek-MD@users.noreply.github.com>
Co-authored-by: Geek-MD <25725990+Geek-MD@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix migration error in v1.3.6 affecting daily counters Fix migration error: add missing async_get_options_flow method Dec 10, 2025
Copilot AI requested a review from Geek-MD December 10, 2025 14:44
@Geek-MD Geek-MD marked this pull request as ready for review December 10, 2025 14:53
@Geek-MD Geek-MD merged commit 34639a7 into main Dec 10, 2025
4 checks passed
@Geek-MD Geek-MD deleted the copilot/fix-migration-error-v1-3-6 branch December 10, 2025 14:53
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