Normalize currency codes, improve auth/connectivity handling, add options & UI fixes#10
Open
Normalize currency codes, improve auth/connectivity handling, add options & UI fixes#10
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
cellartrackerlibrary to present accurate HA config flow feedback and coordinator behavior.Description
CURRENCY_SYMBOLS,LEGACY_CURRENCY_MAP,DEFAULT_SCAN_INTERVAL,MIN_SCAN_INTERVAL, andnormalize_currencyinconst.pyand update defaults accordingly.cellar_data.pyto useCONF_USERNAME,CONF_PASSWORD, andCONF_SCAN_INTERVAL, add_is_auth_error/_is_connectivity_errorhelpers, raiseConfigEntryAuthFailedfor auth failures, log connectivity issues, and setalways_update=Falseon theDataUpdateCoordinator.config_flow.pyto normalize currency input, validate credentials using thecellartrackerlibrary with granular error mapping (auth,cannot_connect,unknown), and enforce minimum scan interval constraints in the UI.sensor.pyto normalize the configured currency for the monetary sensor and mark the inventory status sensor withEntityCategory.DIAGNOSTIC.views.pyto exposecurrency_symbolalongsidecurrencyfrom/api/cellartracker/settingsusingCURRENCY_SYMBOLS.www/cellar.htmlwith improved token extraction (supportingct_token),same-origincredentials, safer fetch error messaging, normalized settings usage forcurrency_symbol,rel="noopener noreferrer"on links, and improved search/filter event handling.hacs.jsonto0.0.11.Testing
Codex Task