mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
Updated all imports to reflect new module structure:
1. Utils package imports:
- average_utils → utils.average
- price_utils → utils.price
- Added MINUTES_PER_INTERVAL imports from const.py
2. Entity utils imports:
- Added entity_utils.helpers imports where needed
- Fixed find_rolling_hour_center_index import paths
- Added get_price_value import in binary_sensor
3. Type imports:
- Added coordinator/period_handlers/types.py MINUTES_PER_INTERVAL
re-export (with noqa:F401) for period handler modules
4. Platform imports:
- Updated sensor platform imports (utils.average, utils.price)
- Updated binary_sensor imports (entity_utils helpers)
- Updated coordinator imports (utils packages)
All import paths validated:
✓ Integration loads successfully
✓ All service handlers importable
✓ No circular dependencies
✓ Lint checks passing
Impact: Clean import structure, no breaking changes to functionality.
All sensors and services work identically to before.
31 lines
922 B
Python
31 lines
922 B
Python
"""
|
|
Tibber GraphQL API client package.
|
|
|
|
This package handles all communication with Tibber's GraphQL API:
|
|
- GraphQL query construction and execution
|
|
- Authentication and session management
|
|
- Error handling and retry logic
|
|
- Response parsing and validation
|
|
|
|
Main components:
|
|
- client.py: TibberPricesApiClient (aiohttp-based GraphQL client)
|
|
- queries.py: GraphQL query definitions
|
|
- exceptions.py: API-specific error classes
|
|
- helpers.py: Response parsing utilities
|
|
"""
|
|
|
|
from .client import TibberPricesApiClient
|
|
from .exceptions import (
|
|
TibberPricesApiClientAuthenticationError,
|
|
TibberPricesApiClientCommunicationError,
|
|
TibberPricesApiClientError,
|
|
TibberPricesApiClientPermissionError,
|
|
)
|
|
|
|
__all__ = [
|
|
"TibberPricesApiClient",
|
|
"TibberPricesApiClientAuthenticationError",
|
|
"TibberPricesApiClientCommunicationError",
|
|
"TibberPricesApiClientError",
|
|
"TibberPricesApiClientPermissionError",
|
|
]
|