hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski 459d6762c7 perf(sensors): add call-avoidance for timer-based state updates
Skip expensive async_write_ha_state() when native_value hasn't changed
since last write. HA's state machine has built-in change detection, but
it only runs AFTER all properties and attributes are evaluated — the
expensive part we now avoid entirely.

Sensor platform (Timer #2 + #3):
- New _write_if_changed() method compares native_value before writing
- Timer #3 (30s, 7 entities): Skips all writes when no period active
- Timer #2 (15min, ~45 entities): Skips enum levels/ratings that stay
  constant across quarter-hour intervals
- Replaces data_lifecycle_status-only pattern with unified approach

Binary sensor platform (Timer #2):
- Period sensors only write at actual period boundaries, not every 15min

Coordinator push updates always write (sentinel reset ensures freshness).

Impact: Eliminates asyncio "Executing TimerHandle took 1.4s" warnings
caused by redundant property evaluation in Timer #3 callbacks. Reduces
event loop blocking from ~1.4s to microseconds when values unchanged.
2026-04-09 19:04:04 +00:00
..
api feat(api): add energy and tax fields to Tibber GraphQL queries 2026-04-09 18:27:21 +00:00
binary_sensor perf(sensors): add call-avoidance for timer-based state updates 2026-04-09 19:04:04 +00:00
brand feat(brand): add local brand images for HA brands proxy API 2026-04-09 17:06:13 +00:00
config_flow_handlers feat(sensors)!: rename price_trend_Xh → price_outlook_Xh, add price_trajectory_Xh 2026-04-09 16:08:42 +00:00
coordinator feat(sensors)!: rename price_trend_Xh → price_outlook_Xh, add price_trajectory_Xh 2026-04-09 16:08:42 +00:00
custom_translations feat(translations): add price_outlook_Xh and price_trajectory_Xh strings 2026-04-09 16:08:54 +00:00
entity_utils fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
interval_pool perf(interval_pool): hoist fetch_groups and precompute period criteria 2026-04-06 14:35:33 +00:00
number refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
sensor perf(sensors): add call-avoidance for timer-based state updates 2026-04-09 19:04:04 +00:00
services feat(services): add energy/tax fields to get_chartdata action 2026-04-09 18:27:53 +00:00
switch refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
translations feat(services): add energy/tax fields to get_chartdata action 2026-04-09 18:27:53 +00:00
utils feat(trend): add direction-group detection, noise floor, and confirmation hysteresis 2026-04-07 13:44:01 +00:00
__init__.py feat(config_flow): add trend confirmation and noise floor settings 2026-04-07 13:44:47 +00:00
config_flow.py feat(config_flow): add price level gap tolerance for Tibber API level field 2025-12-22 20:25:30 +00:00
const.py feat(trend): add direction-group detection, noise floor, and confirmation hysteresis 2026-04-07 13:44:01 +00:00
data.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
diagnostics.py refactor(lifecycle): integrate with Pool for sensor metrics 2025-12-23 14:13:34 +00:00
entity.py fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
icons.json feat(services): add hourly resolution option for chart data services 2026-01-20 15:51:34 +00:00
manifest.json chore(release): bump version to 0.29.0 2026-04-07 15:07:08 +00:00
services.yaml feat(services): add energy/tax fields to get_chartdata action 2026-04-09 18:27:53 +00:00