hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski ced6dcf104 fix(coordinator): sync cached_user_data after API call for new integrations
When adding a new integration (no existing cache), metadata sensors
(grid_company, estimated_annual_consumption, etc.) were marked as
unavailable because coordinator._cached_user_data remained None even
after successful API call.

Root cause: update_user_data_if_needed() stored user data in
_data_fetcher.cached_user_data, but the sync back to coordinator
only happened during _load_cache() (before the API call).

Solution: Added explicit sync of cached_user_data after
handle_main_entry_update() completes, ensuring metadata is available
when sensors first access get_user_homes().

Changes:
- coordinator/core.py: Sync _cached_user_data after main entry update
- __init__.py: Kept preload cache call (helps with HA restarts)

Impact: Metadata sensors now show values immediately on fresh integration
setup, without requiring a second update cycle or manual sensor activation.
2025-11-19 20:55:13 +00:00
..
api refactor(coordinator): centralize time operations through TimeService 2025-11-19 18:36:12 +00:00
binary_sensor refactor(coordinator): centralize time operations through TimeService 2025-11-19 18:36:12 +00:00
config_flow_handlers refactor(periods): merge adjacent periods and remove is_extension logic 2025-11-19 20:16:58 +00:00
coordinator fix(coordinator): sync cached_user_data after API call for new integrations 2025-11-19 20:55:13 +00:00
custom_translations feat(sensor): migrate chart_data_export from binary_sensor to sensor platform 2025-11-17 04:11:10 +00:00
entity_utils refactor(coordinator): centralize time operations through TimeService 2025-11-19 18:36:12 +00:00
sensor refactor(coordinator): centralize time operations through TimeService 2025-11-19 18:36:12 +00:00
services refactor(coordinator): centralize time operations through TimeService 2025-11-19 18:36:12 +00:00
translations refactor(periods): merge adjacent periods and remove is_extension logic 2025-11-19 20:16:58 +00:00
utils refactor(coordinator): centralize time operations through TimeService 2025-11-19 18:36:12 +00:00
__init__.py fix(coordinator): sync cached_user_data after API call for new integrations 2025-11-19 20:55:13 +00:00
config_flow.py refactor(config_flow): restructure package to satisfy hassfest validation 2025-11-15 17:40:53 +00:00
const.py refactor(periods): merge adjacent periods and remove is_extension logic 2025-11-19 20:16:58 +00:00
data.py refactoring 2025-04-23 16:42:31 +00:00
diagnostics.py update dev environment 2025-11-03 15:54:01 +00:00
entity.py feat(api): add multi-home support and diagnostic sensors 2025-11-16 00:11:56 +00:00
manifest.json chore(release): bump version to 0.11.0 2025-11-19 20:18:37 +00:00
services.yaml feat(chart_export): add Chart Data Export diagnostic sensor 2025-11-17 03:14:02 +00:00