hass.tibber_prices/custom_components/tibber_prices/config_flow.py
Julian Pawlowski 1d065b11cd fix(services): use injected now in resolve_search_range day offset
_resolve_time_with_day_offset() was calling dt_util.now() internally
instead of using the injected now parameter. This caused incorrect date
calculations in tests and any caller that passes a specific reference time.

Also add missing price_rank_* sensor keys to TIME_SENSITIVE_ENTITY_KEYS
in coordinator/constants.py so quarter-hour refresh is registered for all
11 price rank sensors (current/next/previous interval and hour variants).

Rename dt as dt_utils → dt as dt_util (ICN001) across 11 files to follow
the project-wide import alias convention. Apply ruff auto-fixes for import
ordering and collapsing single-item imports throughout the codebase.

Released-Bug: no
2026-04-14 19:33:24 +00:00

50 lines
1.5 KiB
Python

"""
Config flow for Tibber Prices integration.
This module serves as the entry point for Home Assistant's config flow discovery.
The actual implementation is in the config_flow_handlers package.
"""
from __future__ import annotations
from .config_flow_handlers.options_flow import TibberPricesOptionsFlowHandler as OptionsFlowHandler
from .config_flow_handlers.schemas import (
get_best_price_schema,
get_options_init_schema,
get_peak_price_schema,
get_price_level_schema,
get_price_rating_schema,
get_price_trend_schema,
get_reauth_confirm_schema,
get_select_home_schema,
get_subentry_init_schema,
get_user_schema,
get_volatility_schema,
)
from .config_flow_handlers.subentry_flow import TibberPricesSubentryFlowHandler as SubentryFlowHandler
from .config_flow_handlers.user_flow import TibberPricesConfigFlowHandler as ConfigFlow
from .config_flow_handlers.validators import (
TibberPricesCannotConnectError,
TibberPricesInvalidAuthError,
validate_api_token,
)
__all__ = [
"ConfigFlow",
"OptionsFlowHandler",
"SubentryFlowHandler",
"TibberPricesCannotConnectError",
"TibberPricesInvalidAuthError",
"get_best_price_schema",
"get_options_init_schema",
"get_peak_price_schema",
"get_price_level_schema",
"get_price_rating_schema",
"get_price_trend_schema",
"get_reauth_confirm_schema",
"get_select_home_schema",
"get_subentry_init_schema",
"get_user_schema",
"get_volatility_schema",
"validate_api_token",
]