hass.tibber_prices/docs/user/docs/data-actions.md
Julian Pawlowski 999ecd358f docs(user): collapse code blocks and normalize labels
Wrap most user-guide code examples in collapsible details sections to reduce visual noise while keeping Mermaid diagrams expanded.

Standardized summary labels across the user docs to a small set of readable patterns and removed technical or awkward wording from visible collapse titles.

Impact: User documentation is easier to scan, with long examples hidden by default and more consistent expand/collapse labels.
2026-04-11 19:51:58 +00:00

2 KiB

Data & Utility Actions

Actions for fetching raw price data and managing integration state.


tibber_prices.get_price

Purpose: Fetches raw price interval data for any time range. Uses intelligent caching — only intervals not already cached are fetched from the Tibber API.

Parameters:

Parameter Description Required
entry_id Config entry ID Yes
start_time Start of the time range Yes
end_time End of the time range Yes

Example:

Show YAML: Get Price
service: tibber_prices.get_price
data:
    entry_id: YOUR_CONFIG_ENTRY_ID
    start_time: "2025-11-01T00:00:00"
    end_time: "2025-11-02T00:00:00"
response_variable: price_data

Response Format:

Show JSON: Get Price Response
{
    "home_id": "abc-123",
    "start_time": "2025-11-01T00:00:00+01:00",
    "end_time": "2025-11-02T00:00:00+01:00",
    "interval_count": 96,
    "price_info": [
        {
            "startsAt": "2025-11-01T00:00:00+01:00",
            "total": 0.2534,
            "energy": 0.1218,
            "tax": 0.1316
        }
    ]
}

Use cases:

  • Fetching historical price data for analysis
  • Comparing prices across arbitrary date ranges
  • Building custom charts with historical data

Note: Times are automatically converted to your Tibber home's timezone. The interval pool caches previously fetched intervals, so repeated calls for the same range are fast.


tibber_prices.refresh_user_data

Purpose: Forces an immediate refresh of user data (homes, subscriptions) from the Tibber API.

Example:

Show YAML: Refresh User Data
service: tibber_prices.refresh_user_data
data:
    entry_id: YOUR_CONFIG_ENTRY_ID

Note: User data is cached for 24 hours. Trigger this action only when you need immediate updates (e.g., after changing Tibber subscriptions).