hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski e01cc5d447 feat(services): allow entity IDs as service parameter values
Add entity_resolver module that lets all service parameters accept
HA entity references in place of literal values. The entity's current
state (or a specific attribute via the @attr syntax) is resolved at
call time and coerced to the expected Python type.

Syntax:
  "sensor.washing_duration"           → uses entity state
  "sensor.washing_duration@run_minutes" → uses entity attribute

Apply or_entity_ref() and resolve_entity_references() to all five
service handlers (get_price, find_cheapest_block, find_cheapest_hours,
find_cheapest_schedule, get_chartdata) for every parameter where a
dynamic value from another entity is useful (duration, start/end times,
offsets, etc.).

Add five new translation keys for entity-resolution error messages
(invalid_entity_reference, entity_not_found, entity_attribute_not_found,
entity_state_unavailable, entity_value_conversion_failed) across all
five language files.

Fix pytest warning filter to suppress AsyncMock cleanup noise, and
update test_resource_cleanup to mock hass.config_entries.async_entries
so the blueprint-removal path in async_remove_entry does not raise.

Impact: Automations and scripts can pass sensor entity IDs as service
parameters (e.g. duration from a sensor) instead of having to use
template-based workarounds.
2026-04-20 18:44:24 +00:00
..
api fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
binary_sensor refactor(attributes): streamline phase type retrieval and attribute building 2026-04-17 08:52:17 +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 refactor(periods): replace cross-day extension with bidirectional bridging 2026-04-19 11:47:45 +00:00
custom_translations refactor(translations): update terminology for previous interval price ranks 2026-04-15 10:43:29 +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 perf(interval_pool): skip redundant API calls when prior fetch covers range 2026-04-17 12:00:57 +00:00
number fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
sensor refactor(day_patterns): rename double valley/peak to double dip/duck curve 2026-04-17 14:37:17 +00:00
services feat(services): allow entity IDs as service parameter values 2026-04-20 18:44:24 +00:00
switch fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
translations feat(services): allow entity IDs as service parameter values 2026-04-20 18:44:24 +00:00
utils feat(pricing): add relaxation logic for progressive filter loosening 2026-04-18 21:27:05 +00:00
__init__.py refactor(repairs): simplify currency mode change notification to one-shot 2026-04-15 10:00:59 +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 refactor(repairs): simplify currency mode change notification to one-shot 2026-04-15 10:00:59 +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 fix(lint): apply Python 3.14 ruff rules and update HA minimum version 2026-04-11 10:56:34 +00:00
icons.json refactor(icons): streamline service icon definitions and enhance chartdata sections 2026-04-19 12:35:13 +00:00
manifest.json refactor(periods): enhance peak period filtering and validation logic 2026-04-17 22:24:18 +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 feat(services): add sequential parameter to find_cheapest_schedule 2026-04-19 14:17:32 +00:00