mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 13:23:41 +00:00
Renamed 25 public classes + 1 Enum to include TibberPrices prefix
following Home Assistant integration naming standards.
All classes now follow pattern: TibberPrices{SemanticPurpose}
No package hierarchy in names (import path is namespace).
Key changes:
- Coordinator module: DataFetcher, DataTransformer, ListenerManager,
PeriodCalculator, TimeService (203 usages), CacheData
- Config flow: CannotConnectError, InvalidAuthError
- Entity utils: IconContext
- Sensor calculators: BaseCalculator + 8 subclasses
- Period handlers: 5 NamedTuples (PeriodConfig, PeriodData,
PeriodStatistics, ThresholdConfig, IntervalCriteria)
- Period handlers: SpikeCandidateContext (dataclass → NamedTuple)
- API: QueryType Enum
Documentation updates:
- AGENTS.md: Added Pyright code generation guidelines
- planning/class-naming-refactoring-plan.md: Complete execution log
Quality metrics:
- 0 Pyright errors (strict type checking)
- 0 Ruff errors (linting + formatting)
- All hassfest checks passed
- 79 files validated
Impact: Aligns with HA Core standards (TibberDataCoordinator pattern).
No user-facing changes - internal refactor only.
52 lines
1.5 KiB
Python
52 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_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 TibberPricesFlowHandler 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_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",
|
|
]
|