mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Simplified _has_future_periods() to check for ANY future periods instead of limiting to 6-hour window. This ensures icons show 'waiting' state whenever periods are scheduled, not just within artificial time limit. Also added pragmatic fallback in timing calculator _find_next_period(): when skip_current=True but only one future period exists, return it anyway instead of showing 'unknown'. This prevents timing sensors from showing unknown during active periods. Changes: - binary_sensor/definitions.py: Removed PERIOD_LOOKAHEAD_HOURS constant - binary_sensor/core.py: Simplified _has_future_periods() logic - sensor/calculators/timing.py: Added pragmatic fallback for single period Impact: Better user experience - icons always show future periods, timing sensors show values even during edge cases. |
||
|---|---|---|
| .. | ||
| api | ||
| binary_sensor | ||
| config_flow_handlers | ||
| coordinator | ||
| custom_translations | ||
| entity_utils | ||
| sensor | ||
| services | ||
| translations | ||
| utils | ||
| __init__.py | ||
| config_flow.py | ||
| const.py | ||
| data.py | ||
| diagnostics.py | ||
| entity.py | ||
| manifest.json | ||
| services.yaml | ||