hass.tibber_prices/custom_components/tibber_prices
anthropic-code-agent[bot] 691e917c0a
fix(services): ceil search_start to next quarter when include_current_interval=false
When include_current_interval=False, the search_start was set to the raw
now timestamp (e.g. 14:47:00.167996). The interval pool index iterates in
15-minute steps from that exact value, so keys like 14:47:00, 15:02:00, …
never matched any cached interval (which are always on :00/:15/:30/:45
boundaries), causing no data to be found and returning no_data_in_range.

Fix: replace `now` with `ceil_to_next_quarter_hour(now)` which is always
`floor(now) + 15min`. This skips the interval that is currently in progress
(14:30–14:45 interval) and starts at the first interval that hasn't begun
yet (15:00), consistent with the intent of include_current_interval=False.

Fixes #190

User-Impact: find_cheapest_block/find_most_expensive_block/find_cheapest_hours
with include_current_interval=false and search_scope=next_24h (or no scope)
no longer returns no_data_in_range when data is available.

Agent-Logs-Url: https://github.com/jpawlowski/hass.tibber_prices/sessions/0ea804f9-7c98-4e5a-b40f-469954fa9daa

Co-authored-by: jpawlowski <75446+jpawlowski@users.noreply.github.com>
2026-07-27 16:14:20 +00:00
..
api fix(api): accept priceInfoRange-only responses and retry transient empty data 2026-05-30 14:46:13 +00:00
binary_sensor feat(coordinator): surface prolonged API outages and cache-fallback state 2026-05-30 14:46:32 +00:00
blueprints fix(blueprints): fix home_connect_alt service call and correct sensor description 2026-05-03 22:16:56 +00:00
brand feat(brand): update dark icons for improved visual consistency 2026-04-09 19:04:26 +00:00
config_flow_handlers refactor(repairs): simplify currency mode change notification to one-shot 2026-04-15 10:00:59 +00:00
coordinator feat(coordinator): surface prolonged API outages and cache-fallback state 2026-05-30 14:46:32 +00:00
custom_translations docs(sensor-reference): update translations for price phase sensors 2026-05-30 13:04:55 +00:00
entity_utils fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
interval_pool feat(services): isolate price-fetch failures and add success flag to responses 2026-05-30 14:46:23 +00:00
number fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
sensor feat(services): add price_source parameter to get_chartdata and get_apexcharts_yaml 2026-05-03 18:48:36 +00:00
services fix(services): ceil search_start to next quarter when include_current_interval=false 2026-07-27 16:14:20 +00:00
switch fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
translations fix(translations): correct message formatting in multiple language files 2026-06-01 11:31:18 +00:00
utils feat(services): add power-profile-weighted window selection 2026-05-03 22:16:08 +00:00
__init__.py chore(blueprints): disable automatic blueprint installation 2026-05-03 22:17:02 +00:00
config_flow.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
const.py feat(entity): expose integration version as sw_version in device info 2026-04-20 18:44:34 +00:00
data.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
diagnostics.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
entity.py feat(entity): expose integration version as sw_version in device info 2026-04-20 18:44:34 +00:00
icons.json feat(services): add plan_charging service for battery/EV scheduling 2026-04-20 21:43:41 +00:00
manifest.json chore(release): bump version to 0.32.0 2026-07-04 18:25:27 +00:00
migrations.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
services.yaml refactor(services): change step value to 'any' for plan_charging fields 2026-06-01 11:16:21 +00:00