mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Fixed state inconsistencies during auth errors: Bug #4: tomorrow_data_available incorrectly returns True during auth failure - Now returns None (unknown) when coordinator.last_exception is ConfigEntryAuthFailed - Prevents misleading "data available" when API connection lost Bug #5: Sensor states inconsistent during error conditions - connection: False during auth error (even with cached data) - tomorrow_data_available: None during auth error (cannot verify) - lifecycle_status: "error" during auth error Changes: - binary_sensor/core.py: Check last_exception before evaluating tomorrow data - tests: 25 integration tests covering all error scenarios Impact: All three sensors show consistent states during auth errors, API timeouts, and normal operation. No misleading "available" status when connection is lost. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_avg_none_fallback.py | ||
| test_cache_age.py | ||
| test_cache_validity.py | ||
| test_cache_validity_after_midnight.py | ||
| test_chart_data_push_updates.py | ||
| test_config_validators.py | ||
| test_lifecycle_state.py | ||
| test_midnight_handler.py | ||
| test_midnight_periods.py | ||
| test_midnight_turnover.py | ||
| test_minmax_none_fallback.py | ||
| test_percentage_calculations.py | ||
| test_price_calculations.py | ||
| test_rating_threshold_validation.py | ||
| test_sensor_consistency.py | ||