Skip to content

Add counter reconfiguration via options flow (v1.3.9)#28

Merged
Geek-MD merged 4 commits intomainfrom
copilot/configure-counters-via-options-flow
Dec 11, 2025
Merged

Add counter reconfiguration via options flow (v1.3.9)#28
Geek-MD merged 4 commits intomainfrom
copilot/configure-counters-via-options-flow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 11, 2025

Enables editing existing counters through the UI without deletion/recreation. Previously, users had to delete and recreate counters to change trigger entities or states.

Implementation

  • Update listener: Added async_reload_entry() and registered listener in async_setup_entry() to reload sensors when options change
  • Edit flow: Three new steps in HADailyCounterOptionsFlow:
    • async_step_select_edit() - counter selection
    • async_step_edit_trigger_entity() - entity modification
    • async_step_edit_trigger_state() - state modification with bounds checking
  • Consistency fix: Changed trigger state input from hardcoded selector to free-form string, matching config flow behavior
  • Translations: Added edit-related strings in en.json, es.json, strings.json

Usage

# Options flow menu now includes:
# 1. Add counter
# 2. Edit counter  # NEW
# 3. Delete counter
# 4. Finish setup

# Edit flow shows current values:
# "Editing counter: Front Door
#  Current entity: binary_sensor.front_door
#  Select the new trigger entity:"

Version

Updated manifest.json to 1.3.9, added RELEASE_NOTES_v1.3.9.md and CHANGELOG.md entries.

Original prompt

La integración permite la reconfiguración de los contadores vía options_flow?


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 11, 2025 02:11
Co-authored-by: Geek-MD <25725990+Geek-MD@users.noreply.github.com>
Co-authored-by: Geek-MD <25725990+Geek-MD@users.noreply.github.com>
…s checking

Co-authored-by: Geek-MD <25725990+Geek-MD@users.noreply.github.com>
Copilot AI changed the title [WIP] Add integration for counter reconfiguration via options flow Add counter reconfiguration via options flow (v1.3.9) Dec 11, 2025
Copilot AI requested a review from Geek-MD December 11, 2025 02:18
@Geek-MD Geek-MD marked this pull request as ready for review December 11, 2025 02:19
@Geek-MD Geek-MD merged commit 294e316 into main Dec 11, 2025
4 checks passed
@Geek-MD Geek-MD deleted the copilot/configure-counters-via-options-flow branch December 11, 2025 02:19
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