Skip to main content
Version: Next 🚧

Runtime Override Entities

The integration provides optional number and switch entities that let you change Best Price and Peak Price detection settings at runtime — through automations or the HA UI — without going into the configuration menu.

These entities are disabled by default. Enable them individually in:

Settings → Devices & Services → Tibber Prices → Entities


How overrides work

  1. Entity disabled (default): The configuration menu setting is used
  2. Entity enabled: The entity value overrides the menu setting
  3. Value changes: Trigger immediate period recalculation
  4. HA restart: Entity values are restored automatically

This lets you write automations that adjust detection criteria seasonally, based on weather forecasts, or based on other conditions — without manual configuration changes.

Available entities

Best Price Period

EntityTypeRangeOverrides
number.<home_name>_best_price_flexibilityNumber0–50%Flex percentage
number.<home_name>_best_price_minimum_distanceNumber-50–0%Minimum distance from average
number.<home_name>_best_price_minimum_period_lengthNumber15–180 minMinimum period length
number.<home_name>_best_price_minimum_periodsNumber1–10Target periods per day
number.<home_name>_best_price_relaxation_attemptsNumber1–12Relaxation attempts
number.<home_name>_best_price_gap_toleranceNumber0–8Gap tolerance
switch.<home_name>_best_price_enable_relaxationSwitchOn/OffEnable relaxation

Peak Price Period

EntityTypeRangeOverrides
number.<home_name>_peak_price_flexibilityNumber-50–0%Flex percentage
number.<home_name>_peak_price_minimum_distanceNumber0–50%Minimum distance from average
number.<home_name>_peak_price_minimum_period_lengthNumber15–180 minMinimum period length
number.<home_name>_peak_price_minimum_periodsNumber1–10Target periods per day
number.<home_name>_peak_price_relaxation_attemptsNumber1–12Relaxation attempts
number.<home_name>_peak_price_gap_toleranceNumber0–8Gap tolerance
switch.<home_name>_peak_price_enable_relaxationSwitchOn/OffEnable relaxation

Viewing entity descriptions

Each override entity has a description attribute explaining what the setting does — the same text shown in the configuration menu.

Note for Number entities: Home Assistant shows a history graph by default in the entity detail view, which hides the attributes panel. To see the description:

  1. Go to Developer Tools → States
  2. Search for the entity (e.g., number.<home_name>_best_price_flexibility)
  3. Expand the attributes section

Switch entities show their attributes normally in the entity details view.

Example: Seasonal adjustment

Show YAML: Stricter detection in winter months
automation:
- alias: "Winter: Stricter Best Price Detection"
trigger:
- platform: time
at: "00:00:00"
condition:
- condition: template
value_template: "{{ now().month in [11, 12, 1, 2] }}"
action:
- service: number.set_value
target:
entity_id: number.<home_name>_best_price_flexibility
data:
value: 10 # Stricter than default 15%

Recorder optimization (optional)

These entities are already designed to minimize database impact:

  • EntityCategory.CONFIG — excluded from Long-Term Statistics
  • All attributes excluded from history recording
  • Only state value (the number/switch state) is recorded

If you want to completely exclude these entities from the recorder (no history graph, no database entries at all):

Show YAML: Exclude from recorder
recorder:
exclude:
entity_globs:
- number.*_best_price_*
- number.*_peak_price_*
- switch.*_best_price_*
- switch.*_peak_price_*

This is useful if you rarely change these settings and want the smallest possible database footprint.

💬 Comments are page-specific. For a new question or idea, open a dedicated Discussion on GitHub so it gets its own thread and proper visibility.