hass.tibber_prices/docs/user/docs/actions.md
Julian Pawlowski 96f36a3339 feat(services): add plan_charging service for battery/EV scheduling
Accepts battery parameters (capacity, current/target SoC, max power) and
returns a cost-minimized charging schedule with per-interval power, SoC
progression, and total cost — no manual duration calculation needed.

Supports fixed, continuous (min_charge_power_w), and stepped
(charge_power_steps_w) charging modes, deadline-aware two-pass planning
(must_reach_soc + must_reach_by / must_reach_by_event), and round-trip
economics (expected_discharge_price, reserve_for_discharge,
max_cost_per_kwh) for arbitrage use cases. Includes min_charge_duration
and max_cycles_per_day constraints.

Groups deadline fields (must_reach_soc_*, must_reach_by,
must_reach_by_event) into a dedicated section so a deadline use case can
be configured in one place. Battery section lists capacity before the
percent SoC fields that depend on it. Response exposes stable reason
codes (already_at_target, energy_unreachable, energy_unreachable_by_
deadline, no_intervals_after_economic_filter, …) documented in the
service description and user docs.
2026-04-20 21:43:41 +00:00

4.3 KiB

Actions Overview

Tibber Prices provides actions (formerly called "services") that you can use in automations, scripts, and dashboards. Home Assistant surfaces them in Developer Tools → Actions and in the automation/script editor.

Behind the scenes, YAML still uses the service: key — but the UI calls them "actions".

Finding Your Config Entry ID

Most actions accept an optional entry_id parameter that identifies the config entry (= integration instance) of the Tibber home you want to query. If you only have one home configured, you can omit entry_id entirely — the integration auto-selects your only config entry. If you have multiple homes, you need to specify which one.

In the Action UI — no lookup needed

When you use the action through the Home Assistant interface (Developer Tools → Actions, or the Action picker inside the automation / script editor), the entry_id field renders as a dropdown list showing all your configured Tibber Prices instances. Just select your home from the drop-down and Home Assistant fills in the correct ID automatically. You never have to deal with the raw ID string.

In YAML — copy from the integration menu

When you write YAML directly (automations, scripts, Lovelace dashboard cards), you need the actual ID string. The quickest way to get it:

  1. Go to Settings → Devices & Services
  2. Find the Tibber Prices integration card
  3. Click the (three-dot) menu on the card
  4. Choose "Copy Config Entry ID"
  5. Paste the value wherever you see YOUR_CONFIG_ENTRY_ID in the YAML examples

The ID looks like a long alphanumeric string, for example 01JKPC7AB3EF4GH5IJ6KL7MN8P.

:::tip Multiple homes? If you have configured more than one Tibber home, each home has its own config entry ID. Repeat the steps above for each integration card to get the individual IDs. :::

All Actions at a Glance

Scheduling Actions

Find the cheapest (or most expensive) time windows for your appliances. Ideal for automating when to run devices based on real price data.

Action Description Best For
find_cheapest_block Cheapest contiguous window Dishwasher, washing machine, dryer
find_cheapest_hours Cheapest N hours (non-contiguous OK) EV charging, battery storage, pool pump
find_cheapest_schedule Multiple appliances, no overlap Dishwasher + washing machine overnight
find_most_expensive_block Most expensive contiguous window Peak avoidance, battery discharge
find_most_expensive_hours Most expensive N hours Demand response, consumption shifting
plan_charging Battery/EV schedule from SoC + power Home battery, EV, deadline-aware charging

Scheduling Actions — Full Guide with parameters, response formats, decision flowchart, and automation examples. Plan Charging Action — Guide for battery/EV charging scheduled from SoC and power (not duration).

Chart & Visualization Actions

Generate chart-ready data and ApexCharts configurations for your dashboards.

Action Description
get_chartdata Price data in chart-friendly formats (arrays, filtering, rolling windows)
get_apexcharts_yaml Auto-generated ApexCharts card configuration with color-coded price levels

Chart & Visualization Actions — Full Guide with parameters, examples, rolling window modes, and migration guide.

Data & Utility Actions

Fetch raw price data or refresh cached information.

Action Description
get_price Fetch raw price intervals for any time range (with intelligent caching)
refresh_user_data Force-refresh user data (homes, subscriptions) from Tibber API

Data & Utility Actions — Full Guide with parameters and response formats.