docs(user): unify entity ID examples and add "Entity ID tip" across guides

Added a consistent "Entity ID tip" block and normalized all example
entity IDs to the `<home_name>` placeholder across user docs. Updated
YAML and example references to current entity naming (e.g.,
`sensor.<home_name>_current_electricity_price`,
`sensor.<home_name>_price_today`,
`sensor.<home_name>_today_s_price_volatility`,
`binary_sensor.<home_name>_best_price_period`, etc.). Refreshed
automation examples to use language-independent attributes (e.g.
`price_volatility`) and improved robustness. Aligned ApexCharts examples
to use `sensor.<home_name>_chart_metadata` and corrected references for
tomorrow data availability.

Changed files:
- docs/user/docs/actions.md
- docs/user/docs/automation-examples.md
- docs/user/docs/chart-examples.md
- docs/user/docs/configuration.md
- docs/user/docs/dashboard-examples.md
- docs/user/docs/dynamic-icons.md
- docs/user/docs/faq.md
- docs/user/docs/icon-colors.md
- docs/user/docs/period-calculation.md
- docs/user/docs/sensors.md

Impact: Clearer, language-independent examples that reduce confusion and
prevent brittle automations; easier copy/paste adaptation across setups;
more accurate guidance for chart configuration and period/volatility usage.
This commit is contained in:
Julian Pawlowski 2025-12-25 19:20:37 +00:00
parent c6d6e4a5b2
commit 15e09fa210
10 changed files with 350 additions and 312 deletions

View file

@ -6,6 +6,8 @@ You can still call them from automations, scripts, and dashboards the same way a
## Available Actions
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
### tibber_prices.get_chartdata
**Purpose:** Returns electricity price data in chart-friendly formats for visualization and analysis.
@ -192,8 +194,8 @@ response_variable: config
# Use in dashboard:
type: custom:config-template-card
entities:
- sensor.tibber_home_tomorrow_data
- sensor.tibber_home_chart_metadata # For dynamic Y-axis
- binary_sensor.<home_name>_tomorrow_s_data_available
- sensor.<home_name>_chart_metadata # For dynamic Y-axis
card:
# ... paste generated config
```
@ -245,7 +247,7 @@ data:
## Migration from Chart Data Export Sensor
If you're still using the `sensor.tibber_home_chart_data_export` sensor, consider migrating to the `tibber_prices.get_chartdata` action:
If you're still using the `sensor.<home_name>_chart_data_export` sensor, consider migrating to the `tibber_prices.get_chartdata` action:
**Benefits:**

View file

@ -13,6 +13,16 @@
---
> **Important Note:** The following examples are intended as templates to illustrate the logic. They are **not** suitable for direct copy & paste without adaptation.
>
> Please make sure you:
> 1. Replace the **Entity IDs** (e.g., `sensor.<home_name>_...`, `switch.pool_pump`) with the IDs of your own devices and sensors.
> 2. Adapt the logic to your specific devices (e.g., heat pump, EV, water boiler).
>
> These examples provide a good starting point but must be tailored to your individual Home Assistant setup.
>
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
## Price-Based Automations
Coming soon...
@ -21,215 +31,128 @@ Coming soon...
## Volatility-Aware Automations
These examples show how to handle low-volatility days where period classifications may flip at midnight despite minimal absolute price changes.
These examples show how to create robust automations that only act when price differences are meaningful, avoiding unnecessary actions on days with flat prices.
### Use Case: Only Act on High-Volatility Days
### Use Case: Only Act on Meaningful Price Variations
On days with low price variation (< 15% volatility), the difference between "cheap" and "expensive" periods is minimal. This automation only runs appliances when the savings are meaningful:
On days with low price variation, the difference between "cheap" and "expensive" periods can be just a fraction of a cent. This automation charges a home battery only when the volatility is high enough to result in actual savings.
**Best Practice:** Instead of checking a numeric percentage, this automation checks the sensor's classified state. This makes the automation simpler and respects the volatility thresholds you have configured centrally in the integration's options.
```yaml
automation:
- alias: "Dishwasher - Best Price (High Volatility Only)"
description: "Start dishwasher during Best Price period, but only on days with meaningful price differences"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
to: "on"
condition:
# Only act if volatility > 15% (meaningful savings)
- condition: numeric_state
entity_id: sensor.tibber_home_volatility_today
above: 15
# Optional: Ensure dishwasher is idle and door closed
- condition: state
entity_id: binary_sensor.dishwasher_door
state: "off"
action:
- service: switch.turn_on
target:
entity_id: switch.dishwasher_smart_plug
- service: notify.mobile_app
data:
message: "Dishwasher started during Best Price period ({{ states('sensor.tibber_home_current_interval_price_ct') }} ct/kWh, volatility {{ states('sensor.tibber_home_volatility_today') }}%)"
```
**Why this works:**
- On high-volatility days (e.g., 25% span), Best Price periods save 5-10 ct/kWh
- On low-volatility days (e.g., 8% span), savings are only 1-2 ct/kWh
- User can manually start dishwasher on low-volatility days without automation interference
### Use Case: Absolute Price Threshold
Instead of relying on relative classification, check if the absolute price is cheap enough:
```yaml
automation:
- alias: "Water Heater - Cheap Enough"
description: "Heat water when price is below absolute threshold, regardless of period classification"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
to: "on"
condition:
# Absolute threshold: Only run if < 20 ct/kWh
- condition: numeric_state
entity_id: sensor.tibber_home_current_interval_price_ct
below: 20
# Optional: Check water temperature
- condition: numeric_state
entity_id: sensor.water_heater_temperature
below: 55 # Only heat if below 55°C
action:
- service: switch.turn_on
target:
entity_id: switch.water_heater
- delay:
hours: 2 # Heat for 2 hours
- service: switch.turn_off
target:
entity_id: switch.water_heater
```
**Why this works:**
- Period classification can flip at midnight on low-volatility days
- Absolute threshold (20 ct/kWh) is stable across midnight boundary
- User sets their own "cheap enough" price based on local rates
### Use Case: Combined Volatility and Price Check
Most robust approach: Check both volatility and absolute price:
```yaml
automation:
- alias: "EV Charging - Smart Strategy"
description: "Charge EV using volatility-aware logic"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
to: "on"
condition:
# Check battery level
- condition: numeric_state
entity_id: sensor.ev_battery_level
below: 80
# Strategy: High volatility OR cheap enough
- condition: or
conditions:
# Path 1: High volatility day - trust period classification
- alias: "Home Battery - Charge During Best Price (Moderate+ Volatility)"
description: "Charge home battery during Best Price periods, but only on days with meaningful price differences"
trigger:
- platform: state
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
condition:
# Best Practice: Check the classified volatility level.
# This ensures the automation respects the thresholds you set in the config options.
# We use the 'price_volatility' attribute for a language-independent check.
# 'low' means minimal savings, so we only run if it's NOT low.
- condition: template
value_template: >
{{ state_attr('sensor.<home_name>_today_s_price_volatility', 'price_volatility') != 'low' }}
# Only charge if battery has capacity
- condition: numeric_state
entity_id: sensor.tibber_home_volatility_today
above: 15
# Path 2: Low volatility but price is genuinely cheap
entity_id: sensor.home_battery_level
below: 90
action:
- service: switch.turn_on
target:
entity_id: switch.home_battery_charge
- service: notify.mobile_app
data:
message: >
Home battery charging started. Price: {{ states('sensor.<home_name>_current_electricity_price') }} {{ state_attr('sensor.<home_name>_current_electricity_price', 'unit_of_measurement') }}.
Today's volatility is {{ state_attr('sensor.<home_name>_today_s_price_volatility', 'price_volatility') }}.
```
**Why this works:**
- The automation only runs if volatility is `moderate`, `high`, or `very_high`.
- If you adjust your volatility thresholds in the future, this automation adapts automatically without any changes.
- It uses the `price_volatility` attribute, ensuring it works correctly regardless of your Home Assistant's display language.
### Use Case: Combined Volatility and Absolute Price Check
This is the most robust approach. It trusts the "Best Price" classification on volatile days but adds a backup absolute price check for low-volatility days. This handles situations where prices are globally low, even if the daily variation is minimal.
```yaml
automation:
- alias: "EV Charging - Smart Strategy"
description: "Charge EV using volatility-aware logic"
trigger:
- platform: state
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
condition:
# Check battery level
- condition: numeric_state
entity_id: sensor.tibber_home_current_interval_price_ct
below: 18
action:
- service: switch.turn_on
target:
entity_id: switch.ev_charger
- service: notify.mobile_app
data:
message: >
EV charging started: {{ states('sensor.tibber_home_current_interval_price_ct') }} ct/kWh
(Volatility: {{ states('sensor.tibber_home_volatility_today') }}%)
entity_id: sensor.ev_battery_level
below: 80
# Strategy: Moderate+ volatility OR the price is genuinely cheap
- condition: or
conditions:
# Path 1: Volatility is not 'low', so we trust the 'Best Price' period classification.
- condition: template
value_template: >
{{ state_attr('sensor.<home_name>_today_s_price_volatility', 'price_volatility') != 'low' }}
# Path 2: Volatility is low, but we charge anyway if the price is below an absolute cheapness threshold.
- condition: numeric_state
entity_id: sensor.<home_name>_current_electricity_price
below: 0.18
action:
- service: switch.turn_on
target:
entity_id: switch.ev_charger
- service: notify.mobile_app
data:
message: >
EV charging started. Price: {{ states('sensor.<home_name>_current_electricity_price') }} {{ state_attr('sensor.<home_name>_current_electricity_price', 'unit_of_measurement') }}.
Today's volatility is {{ state_attr('sensor.<home_name>_today_s_price_volatility', 'price_volatility') }}.
```
**Why this works:**
- On high-volatility days (> 15%): Trust the Best Price classification
- On low-volatility days (< 15%): Only charge if price is actually cheap (< 18 ct/kWh)
- Handles midnight flips gracefully: Continues charging if price stays cheap
### Use Case: Ignore Period Flips During Active Period
- On days with meaningful price swings, it charges during any `Best Price` period.
- On days with flat prices, it still charges if the price drops below your personal "cheap enough" threshold (e.g., 0.18 €/kWh or 18 ct/kWh).
- This gracefully handles midnight period flips, as the absolute price check will likely remain true if prices stay low.
Prevent automations from stopping mid-cycle when a period flips at midnight:
### Use Case: Using the Period's Own Volatility Attribute
For maximum simplicity, you can use the attributes of the `best_price_period` sensor itself. It contains the volatility classification for the day the period belongs to. This is especially useful for periods that span across midnight.
```yaml
automation:
- alias: "Washing Machine - Complete Cycle"
description: "Start washing machine during Best Price, ignore midnight flips"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
to: "on"
condition:
# Only start if washing machine is idle
- condition: state
entity_id: sensor.washing_machine_state
state: "idle"
# And volatility is meaningful
- condition: numeric_state
entity_id: sensor.tibber_home_volatility_today
above: 15
action:
- service: button.press
target:
entity_id: button.washing_machine_eco_program
# Create input_boolean to track active cycle
- service: input_boolean.turn_on
target:
entity_id: input_boolean.washing_machine_auto_started
# Separate automation: Clear flag when cycle completes
- alias: "Washing Machine - Cycle Complete"
trigger:
- platform: state
entity_id: sensor.washing_machine_state
to: "finished"
condition:
# Only clear flag if we auto-started it
- condition: state
entity_id: input_boolean.washing_machine_auto_started
state: "on"
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.washing_machine_auto_started
- service: notify.mobile_app
data:
message: "Washing cycle complete"
- alias: "Heat Pump - Smart Heating Using Period's Volatility"
trigger:
- platform: state
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
condition:
# Best Practice: Check if the period's own volatility attribute is not 'low'.
# This correctly handles periods that start today but end tomorrow.
- condition: template
value_template: >
{{ state_attr('binary_sensor.<home_name>_best_price_period', 'volatility') != 'low' }}
action:
- service: climate.set_temperature
target:
entity_id: climate.heat_pump
data:
temperature: 22 # Boost temperature during cheap period
```
**Why this works:**
- Uses `input_boolean` to track auto-started cycles
- Won't trigger multiple times if period flips during the 2-3 hour wash cycle
- Only triggers on "off" → "on" transitions, not during "on" → "on" continuity
### Use Case: Per-Period Day Volatility
The simplest approach: Use the period's day volatility attribute directly:
```yaml
automation:
- alias: "Heat Pump - Smart Heating"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
to: "on"
condition:
# Check if the PERIOD'S DAY has meaningful volatility
- condition: template
value_template: >
{{ state_attr('binary_sensor.tibber_home_best_price_period', 'day_volatility_%') | float(0) > 15 }}
action:
- service: climate.set_temperature
target:
entity_id: climate.heat_pump
data:
temperature: 22 # Boost temperature during cheap period
```
**Available per-period attributes:**
- `day_volatility_%`: Percentage volatility of the period's day (e.g., 8.2 for 8.2%)
- `day_price_min`: Minimum price of the day in minor currency (ct/øre)
- `day_price_max`: Maximum price of the day in minor currency (ct/øre)
- `day_price_span`: Absolute difference (max - min) in minor currency (ct/øre)
These attributes are available on both `binary_sensor.tibber_home_best_price_period` and `binary_sensor.tibber_home_peak_price_period`.
**Why this works:**
- Each period knows its day's volatility
- No need to query separate sensors
- Template checks if saving is meaningful (> 15% volatility)
- Each detected period has its own `volatility` attribute (`low`, `moderate`, etc.).
- This is the simplest way to check for meaningful savings for that specific period.
- The attribute name on the binary sensor is `volatility` (lowercase) and its value is also lowercase.
- It also contains other useful attributes like `price_mean`, `price_spread`, and the `price_coefficient_variation_%` for that period.
---
@ -252,10 +175,12 @@ The `tibber_prices.get_apexcharts_yaml` service generates basic ApexCharts card
### Prerequisites
**Required:**
- [ApexCharts Card](https://github.com/RomRider/apexcharts-card) - Install via HACS
- [ApexCharts Card](https://github.com/RomRider/apexcharts-card) - Install via HACS
**Optional (for rolling window mode):**
- [Config Template Card](https://github.com/iantrich/config-template-card) - Install via HACS
- [Config Template Card](https://github.com/iantrich/config-template-card) - Install via HACS
### Installation
@ -270,8 +195,8 @@ The `tibber_prices.get_apexcharts_yaml` service generates basic ApexCharts card
service: tibber_prices.get_apexcharts_yaml
data:
entry_id: YOUR_ENTRY_ID
day: today # or "yesterday", "tomorrow"
level_type: rating_level # or "level" for 5-level view
day: today # or "yesterday", "tomorrow"
level_type: rating_level # or "level" for 5-level view
response_variable: apexcharts_config
```
@ -285,15 +210,16 @@ For a dynamic chart that automatically adapts to data availability:
service: tibber_prices.get_apexcharts_yaml
data:
entry_id: YOUR_ENTRY_ID
day: rolling_window # Or omit for same behavior (default)
day: rolling_window # Or omit for same behavior (default)
level_type: rating_level
response_variable: apexcharts_config
```
**Behavior:**
- **When tomorrow data available** (typically after ~13:00): Shows today + tomorrow
- **When tomorrow data not available**: Shows yesterday + today
- **Fixed 48h span:** Always shows full 48 hours
- **When tomorrow data available** (typically after ~13:00): Shows today + tomorrow
- **When tomorrow data not available**: Shows yesterday + today
- **Fixed 48h span:** Always shows full 48 hours
**Auto-Zoom Variant:**
@ -308,17 +234,17 @@ data:
response_variable: apexcharts_config
```
- Same data loading as rolling window
- **Progressive zoom:** Graph span starts at ~26h in the morning and decreases to ~14h by midnight
- **Updates every 15 minutes:** Always shows 2h lookback + remaining time until midnight
- Same data loading as rolling window
- **Progressive zoom:** Graph span starts at ~26h in the morning and decreases to ~14h by midnight
- **Updates every 15 minutes:** Always shows 2h lookback + remaining time until midnight
**Note:** Rolling window modes require Config Template Card to dynamically adjust the time range.
### Features
- Color-coded price levels/ratings (green = cheap, yellow = normal, red = expensive)
- Best price period highlighting (semi-transparent green overlay)
- Automatic NULL insertion for clean gaps
- Translated labels based on your Home Assistant language
- Interactive zoom and pan
- Live marker showing current time
- Color-coded price levels/ratings (green = cheap, yellow = normal, red = expensive)
- Best price period highlighting (semi-transparent green overlay)
- Automatic NULL insertion for clean gaps
- Translated labels based on your Home Assistant language
- Interactive zoom and pan
- Live marker showing current time

View file

@ -4,6 +4,8 @@ This guide showcases the different chart configurations available through the `t
> **Quick Start:** Call the action with your desired parameters, copy the generated YAML, and paste it into your Lovelace dashboard!
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
## Overview
The integration can generate 4 different chart modes, each optimized for specific use cases:
@ -177,7 +179,7 @@ Rolling window modes (2 & 3) automatically integrate with the `chart_metadata` s
**Requirements:**
- ✅ The `sensor.tibber_home_chart_metadata` must be **enabled** (it's enabled by default!)
- ✅ The `sensor.<home_name>_chart_metadata` must be **enabled** (it's enabled by default!)
- ✅ That's it! The generated YAML automatically uses the sensor for dynamic scaling
**Important:** Do NOT disable the `chart_metadata` sensor if you want optimal Y-axis scaling in rolling window modes!
@ -271,7 +273,7 @@ Wrap in a vertical stack for dashboard integration:
type: vertical-stack
cards:
- type: entity
entity: sensor.tibber_home_current_interval_price
entity: sensor.<home_name>_current_electricity_price
- type: custom:apexcharts-card
# ... generated chart config
```

View file

@ -2,6 +2,8 @@
> **Note:** This guide is under construction. For detailed setup instructions, please refer to the [main README](https://github.com/jpawlowski/hass.tibber_prices/blob/main/README.md).
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
## Initial Setup
Coming soon...
@ -46,8 +48,8 @@ The median tells you the price was **typically** around 13 ct/kWh (4 out of 5 ho
```yaml
# These attributes work regardless of display setting:
{{ state_attr('sensor.tibber_home_average_price_today', 'price_median') }}
{{ state_attr('sensor.tibber_home_average_price_today', 'price_mean') }}
{{ state_attr('sensor.<home_name>_price_today', 'price_median') }}
{{ state_attr('sensor.<home_name>_price_today', 'price_mean') }}
```
This means:

View file

@ -2,6 +2,8 @@
Beautiful dashboard layouts using Tibber Prices sensors.
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
## Basic Price Display Card
Simple card showing current price with dynamic color:
@ -10,12 +12,12 @@ Simple card showing current price with dynamic color:
type: entities
title: Current Electricity Price
entities:
- entity: sensor.tibber_home_current_interval_price
- entity: sensor.<home_name>_current_electricity_price
name: Current Price
icon: mdi:flash
- entity: sensor.tibber_home_current_interval_rating
- entity: sensor.<home_name>_current_price_rating
name: Price Rating
- entity: sensor.tibber_home_next_interval_price
- entity: sensor.<home_name>_next_electricity_price
name: Next Price
```
@ -27,11 +29,11 @@ Show when best/peak price periods are active:
type: horizontal-stack
cards:
- type: entity
entity: binary_sensor.tibber_home_best_price_period
entity: binary_sensor.<home_name>_best_price_period
name: Best Price Active
icon: mdi:currency-eur-off
- type: entity
entity: binary_sensor.tibber_home_peak_price_period
entity: binary_sensor.<home_name>_peak_price_period
name: Peak Price Active
icon: mdi:alert
```
@ -42,7 +44,7 @@ cards:
```yaml
type: custom:button-card
entity: sensor.tibber_home_current_interval_level
entity: sensor.<home_name>_current_price_level
name: Price Level
show_state: true
styles:
@ -69,16 +71,16 @@ type: vertical-stack
cards:
- type: custom:mini-graph-card
entities:
- entity: sensor.tibber_home_current_interval_price
- entity: sensor.<home_name>_current_electricity_price
name: Today's Prices
hours_to_show: 24
points_per_hour: 4
- type: glance
entities:
- entity: sensor.tibber_home_best_price_start_time
- entity: sensor.<home_name>_best_price_start
name: Best Period Starts
- entity: binary_sensor.tibber_home_best_price_period
- entity: binary_sensor.<home_name>_best_price_period
name: Active Now
```
@ -99,17 +101,17 @@ cards:
- type: entities
title: Current Status
entities:
- sensor.tibber_home_current_interval_price
- sensor.tibber_home_current_interval_rating
- sensor.<home_name>_current_electricity_price
- sensor.<home_name>_current_price_rating
- type: vertical-stack
cards:
- type: entities
title: Statistics
entities:
- sensor.tibber_home_daily_avg_today
- sensor.tibber_home_daily_min_today
- sensor.tibber_home_daily_max_today
- sensor.<home_name>_price_today
- sensor.<home_name>_today_s_lowest_price
- sensor.<home_name>_today_s_highest_price
```
## Icon Color Integration
@ -120,15 +122,15 @@ Using the `icon_color` attribute for dynamic colors:
type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.tibber_home_current_interval_price
icon_color: "{{ state_attr('sensor.tibber_home_current_interval_price', 'icon_color') }}"
entity: sensor.<home_name>_current_electricity_price
icon_color: "{{ state_attr('sensor.<home_name>_current_electricity_price', 'icon_color') }}"
- type: entity
entity: binary_sensor.tibber_home_best_price_period
entity: binary_sensor.<home_name>_best_price_period
icon_color: green
- type: entity
entity: binary_sensor.tibber_home_peak_price_period
entity: binary_sensor.<home_name>_peak_price_period
icon_color: red
```
@ -143,7 +145,7 @@ type: picture-elements
image: /local/electricity_dashboard_bg.png
elements:
- type: state-label
entity: sensor.tibber_home_current_interval_price
entity: sensor.<home_name>_current_electricity_price
style:
top: 20%
left: 50%
@ -151,7 +153,7 @@ elements:
font-weight: bold
- type: state-badge
entity: binary_sensor.tibber_home_best_price_period
entity: binary_sensor.<home_name>_best_price_period
style:
top: 40%
left: 30%
@ -170,7 +172,7 @@ card:
title: All Price Sensors
filter:
include:
- entity_id: "sensor.tibber_*_price"
- entity_id: "sensor.<home_name>_*_price"
exclude:
- state: unavailable
sort:

View file

@ -2,6 +2,8 @@
Many sensors in the Tibber Prices integration automatically change their icon based on their current state. This provides instant visual feedback about price levels, trends, and periods without needing to read the actual values.
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
## What are Dynamic Icons?
Instead of having a fixed icon, some sensors update their icon to reflect their current state:
@ -18,15 +20,15 @@ The icons change automatically - no configuration needed!
To see which icon a sensor currently uses:
1. Go to **Developer Tools****States** in Home Assistant
2. Search for your sensor (e.g., `sensor.tibber_home_current_interval_price_level`)
2. Search for your sensor (e.g., `sensor.<home_name>_current_price_level`)
3. Look at the icon displayed in the entity row
4. Change conditions (wait for price changes) and check if the icon updates
**Common sensor types with dynamic icons:**
- Price level sensors (e.g., `current_interval_price_level`)
- Price rating sensors (e.g., `current_interval_price_rating`)
- Volatility sensors (e.g., `volatility_today`)
- Price level sensors (e.g., `current_price_level`)
- Price rating sensors (e.g., `current_price_rating`)
- Volatility sensors (e.g., `today_s_price_volatility`)
- Binary sensors (e.g., `best_price_period`, `peak_price_period`)
## Using Dynamic Icons in Your Dashboard
@ -38,10 +40,10 @@ Dynamic icons work automatically in standard Home Assistant cards:
```yaml
type: entities
entities:
- entity: sensor.tibber_home_current_interval_price_level
- entity: sensor.tibber_home_current_interval_price_rating
- entity: sensor.tibber_home_volatility_today
- entity: binary_sensor.tibber_home_best_price_period
- entity: sensor.<home_name>_current_price_level
- entity: sensor.<home_name>_current_price_rating
- entity: sensor.<home_name>_today_s_price_volatility
- entity: binary_sensor.<home_name>_best_price_period
```
The icons will update automatically as the sensor states change.
@ -51,11 +53,11 @@ The icons will update automatically as the sensor states change.
```yaml
type: glance
entities:
- entity: sensor.tibber_home_current_interval_price_level
- entity: sensor.<home_name>_current_price_level
name: Price Level
- entity: sensor.tibber_home_current_interval_price_rating
- entity: sensor.<home_name>_current_price_rating
name: Rating
- entity: binary_sensor.tibber_home_best_price_period
- entity: binary_sensor.<home_name>_best_price_period
name: Best Price
```
@ -63,7 +65,7 @@ entities:
```yaml
type: custom:button-card
entity: sensor.tibber_home_current_interval_price_level
entity: sensor.<home_name>_current_price_level
name: Current Price Level
show_state: true
# Icon updates automatically - no need to specify it!
@ -73,7 +75,7 @@ show_state: true
```yaml
type: custom:mushroom-entity-card
entity: sensor.tibber_home_volatility_today
entity: sensor.<home_name>_today_s_price_volatility
name: Price Volatility
# Icon changes automatically based on volatility level
```
@ -87,7 +89,7 @@ If you want to use a fixed icon instead of the dynamic one:
```yaml
type: entities
entities:
- entity: sensor.tibber_home_current_interval_price_level
- entity: sensor.<home_name>_current_price_level
icon: mdi:lightning-bolt # Fixed icon, won't change
```
@ -95,7 +97,7 @@ entities:
```yaml
type: custom:button-card
entity: sensor.tibber_home_current_interval_price_rating
entity: sensor.<home_name>_current_price_rating
name: Price Rating
icon: mdi:chart-line # Fixed icon overrides dynamic behavior
show_state: true
@ -109,7 +111,7 @@ Dynamic icons work great together with dynamic colors! See the **[Dynamic Icon C
```yaml
type: custom:button-card
entity: sensor.tibber_home_current_interval_price_level
entity: sensor.<home_name>_current_price_level
name: Current Price
show_state: true
# Icon changes automatically (cheap/expensive cash icons)
@ -137,7 +139,7 @@ Binary sensors may have different icons for different states:
- Has upcoming periods: Timer/waiting icon
- No upcoming periods: Sleep/inactive icon
**Example:** `binary_sensor.tibber_home_best_price_period`
**Example:** `binary_sensor.<home_name>_best_price_period`
- When ON: Shows a piggy bank (good time to save money)
- When OFF with future periods: Shows a timer (waiting for next period)

View file

@ -112,6 +112,8 @@ If you see unexpected units, check your configuration in the integration options
## Automation Questions
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
### How do I run dishwasher during cheap period?
```yaml
@ -119,7 +121,7 @@ automation:
- alias: "Dishwasher during Best Price"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
condition:
- condition: time
@ -141,7 +143,7 @@ automation:
- alias: "Disable charging during peak prices"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_peak_price_period
entity_id: binary_sensor.<home_name>_peak_price_period
to: "on"
action:
- service: switch.turn_off

View file

@ -10,6 +10,8 @@ Many sensors in the Tibber Prices integration provide an `icon_color` attribute
> **Related:** Many sensors also automatically change their **icon** based on state. See the **[Dynamic Icons Guide](dynamic-icons.md)** for details.
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
## What is icon_color?
The `icon_color` attribute contains a **CSS variable name** (not a direct color value) that changes based on the sensor's state. For example:
@ -33,15 +35,15 @@ You can use the `icon_color` attribute directly in your card templates, or inter
Many sensors provide the `icon_color` attribute for dynamic styling. To see if a sensor has this attribute:
1. Go to **Developer Tools****States** in Home Assistant
2. Search for your sensor (e.g., `sensor.tibber_home_current_interval_price_level`)
2. Search for your sensor (e.g., `sensor.<home_name>_current_price_level`)
3. Look for `icon_color` in the attributes section
**Common sensor types with icon_color:**
- Price level sensors (e.g., `current_interval_price_level`)
- Price rating sensors (e.g., `current_interval_price_rating`)
- Volatility sensors (e.g., `volatility_today`)
- Price trend sensors (e.g., `price_trend_next_3h`)
- Price level sensors (e.g., `current_price_level`)
- Price rating sensors (e.g., `current_price_rating`)
- Volatility sensors (e.g., `today_s_price_volatility`)
- Price trend sensors (e.g., `price_trend_3h`)
- Binary sensors (e.g., `best_price_period`, `peak_price_period`)
- Timing sensors (e.g., `best_price_time_until_start`, `best_price_progress`)
@ -97,7 +99,7 @@ The [custom:button-card](https://github.com/custom-cards/button-card) from HACS
```yaml
type: custom:button-card
entity: sensor.tibber_home_current_interval_price_level
entity: sensor.<home_name>_current_price_level
name: Current Price Level
show_state: true
icon: mdi:cash
@ -113,7 +115,7 @@ styles:
```yaml
type: custom:button-card
entity: sensor.tibber_home_current_interval_price_level
entity: sensor.<home_name>_current_price_level
name: Current Price Level
show_state: true
icon: mdi:cash
@ -138,16 +140,16 @@ Use Home Assistant's built-in entities card with card_mod for icon and state col
```yaml
type: entities
entities:
- entity: sensor.tibber_home_current_interval_price_level
- entity: sensor.<home_name>_current_price_level
card_mod:
style:
hui-generic-entity-row:
$: |
state-badge {
color: {{ state_attr('sensor.tibber_home_current_interval_price_level', 'icon_color') }} !important;
color: {{ state_attr('sensor.<home_name>_current_price_level', 'icon_color') }} !important;
}
.info {
color: {{ state_attr('sensor.tibber_home_current_interval_price_level', 'icon_color') }} !important;
color: {{ state_attr('sensor.<home_name>_current_price_level', 'icon_color') }} !important;
}
```
@ -159,13 +161,13 @@ The [Mushroom cards](https://github.com/piitaya/lovelace-mushroom) support card_
```yaml
type: custom:mushroom-entity-card
entity: binary_sensor.tibber_home_best_price_period
entity: binary_sensor.<home_name>_best_price_period
name: Best Price Period
icon: mdi:piggy-bank
card_mod:
style: |
ha-card {
--card-mod-icon-color: {{ state_attr('binary_sensor.tibber_home_best_price_period', 'icon_color') }};
--card-mod-icon-color: {{ state_attr('binary_sensor.<home_name>_best_price_period', 'icon_color') }};
}
```
@ -173,13 +175,13 @@ card_mod:
```yaml
type: custom:mushroom-entity-card
entity: sensor.tibber_home_current_interval_price_level
entity: sensor.<home_name>_current_price_level
name: Price Level
card_mod:
style: |
ha-card {
--card-mod-icon-color: {{ state_attr('sensor.tibber_home_current_interval_price_level', 'icon_color') }};
--primary-text-color: {{ state_attr('sensor.tibber_home_current_interval_price_level', 'icon_color') }};
--card-mod-icon-color: {{ state_attr('sensor.<home_name>_current_price_level', 'icon_color') }};
--primary-text-color: {{ state_attr('sensor.<home_name>_current_price_level', 'icon_color') }};
}
```
@ -190,19 +192,19 @@ Combine multiple sensors with dynamic colors:
```yaml
type: glance
entities:
- entity: sensor.tibber_home_current_interval_price_level
- entity: sensor.tibber_home_volatility_today
- entity: binary_sensor.tibber_home_best_price_period
- entity: sensor.<home_name>_current_price_level
- entity: sensor.<home_name>_today_s_price_volatility
- entity: binary_sensor.<home_name>_best_price_period
card_mod:
style: |
ha-card div.entity:nth-child(1) state-badge {
color: {{ state_attr('sensor.tibber_home_current_interval_price_level', 'icon_color') }} !important;
color: {{ state_attr('sensor.<home_name>_current_price_level', 'icon_color') }} !important;
}
ha-card div.entity:nth-child(2) state-badge {
color: {{ state_attr('sensor.tibber_home_volatility_today', 'icon_color') }} !important;
color: {{ state_attr('sensor.<home_name>_today_s_price_volatility', 'icon_color') }} !important;
}
ha-card div.entity:nth-child(3) state-badge {
color: {{ state_attr('binary_sensor.tibber_home_best_price_period', 'icon_color') }} !important;
color: {{ state_attr('binary_sensor.<home_name>_best_price_period', 'icon_color') }} !important;
}
```
@ -217,7 +219,7 @@ cards:
- type: horizontal-stack
cards:
- type: custom:button-card
entity: sensor.tibber_home_current_interval_price_level
entity: sensor.<home_name>_current_price_level
name: Price Level
show_state: true
styles:
@ -228,7 +230,7 @@ cards:
]]]
- type: custom:button-card
entity: sensor.tibber_home_current_interval_price_rating
entity: sensor.<home_name>_current_price_rating
name: Price Rating
show_state: true
styles:
@ -242,7 +244,7 @@ cards:
- type: horizontal-stack
cards:
- type: custom:button-card
entity: binary_sensor.tibber_home_best_price_period
entity: binary_sensor.<home_name>_best_price_period
name: Best Price Period
show_state: true
icon: mdi:piggy-bank
@ -254,7 +256,7 @@ cards:
]]]
- type: custom:button-card
entity: binary_sensor.tibber_home_peak_price_period
entity: binary_sensor.<home_name>_peak_price_period
name: Peak Price Period
show_state: true
icon: mdi:alert-circle
@ -269,7 +271,7 @@ cards:
- type: horizontal-stack
cards:
- type: custom:button-card
entity: sensor.tibber_home_volatility_today
entity: sensor.<home_name>_today_s_price_volatility
name: Volatility
show_state: true
styles:
@ -280,7 +282,7 @@ cards:
]]]
- type: custom:button-card
entity: sensor.tibber_home_price_trend_next_3h
entity: sensor.<home_name>_price_trend_3h
name: Next 3h Trend
show_state: true
styles:
@ -331,7 +333,7 @@ Instead of using `icon_color`, read the sensor state and apply your own colors:
```yaml
type: custom:button-card
entity: sensor.tibber_home_current_interval_price_level
entity: sensor.<home_name>_current_price_level
name: Current Price Level
show_state: true
icon: mdi:cash
@ -353,7 +355,7 @@ styles:
```yaml
type: custom:button-card
entity: binary_sensor.tibber_home_best_price_period
entity: binary_sensor.<home_name>_best_price_period
name: Best Price Period
show_state: true
icon: mdi:piggy-bank
@ -375,7 +377,7 @@ styles:
```yaml
type: custom:button-card
entity: sensor.tibber_home_volatility_today
entity: sensor.<home_name>_today_s_price_volatility
name: Volatility Today
show_state: true
styles:
@ -395,7 +397,7 @@ styles:
```yaml
type: custom:button-card
entity: sensor.tibber_home_current_interval_price_rating
entity: sensor.<home_name>_current_price_rating
name: Price Rating
show_state: true
styles:

View file

@ -2,6 +2,8 @@
Learn how Best Price and Peak Price periods work, and how to configure them for your needs.
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
## Table of Contents
- [Quick Start](#quick-start)
@ -445,7 +447,7 @@ best_price_min_distance_from_avg: 5 # (default)
automation:
- trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
action:
- service: switch.turn_on
@ -459,7 +461,7 @@ automation:
### No Periods Found
**Symptom:** `binary_sensor.tibber_home_best_price_period` never turns "on"
**Symptom:** `binary_sensor.<home_name>_best_price_period` never turns "on"
**Common Solutions:**
@ -510,7 +512,7 @@ automation:
**Key attributes to check:**
```yaml
# Entity: binary_sensor.tibber_home_best_price_period
# Entity: binary_sensor.<home_name>_best_price_period
# When "on" (period active):
start: "2025-11-11T02:00:00+01:00" # Period start time
@ -579,8 +581,8 @@ Check the volatility sensors to understand if a period flip is meaningful:
```yaml
# Check daily volatility (available in integration)
sensor.tibber_home_volatility_today: 8.2% # Low volatility
sensor.tibber_home_volatility_tomorrow: 7.9% # Also low
sensor.<home_name>_today_s_price_volatility: 8.2% # Low volatility
sensor.<home_name>_tomorrow_s_price_volatility: 7.9% # Also low
# Low volatility (< 15%) means:
# - Small absolute price differences between periods
@ -598,11 +600,11 @@ automation:
- alias: "Dishwasher - Best Price (High Volatility Only)"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
condition:
- condition: numeric_state
entity_id: sensor.tibber_home_volatility_today
entity_id: sensor.<home_name>_today_s_price_volatility
above: 15 # Only act if volatility > 15%
action:
- service: switch.turn_on
@ -613,11 +615,11 @@ automation:
- alias: "Heat Water - Cheap Enough"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
condition:
- condition: numeric_state
entity_id: sensor.tibber_home_current_interval_price_ct
entity_id: sensor.<home_name>_current_electricity_price
below: 20 # Absolute threshold: < 20 ct/kWh
action:
- service: switch.turn_on
@ -628,13 +630,13 @@ automation:
- alias: "EV Charging - Volatility-Aware"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
condition:
# Check if the period's day has meaningful volatility
- condition: template
value_template: >
{{ state_attr('binary_sensor.tibber_home_best_price_period', 'day_volatility_%') | float(0) > 15 }}
{{ state_attr('binary_sensor.<home_name>_best_price_period', 'day_volatility_%') | float(0) > 15 }}
action:
- service: switch.turn_on
entity_id: switch.ev_charger
@ -645,7 +647,7 @@ automation:
Each period sensor exposes day volatility and price statistics:
```yaml
binary_sensor.tibber_home_best_price_period:
binary_sensor.<home_name>_best_price_period:
day_volatility_%: 8.2 # Volatility % of the period's day
day_price_min: 1800.0 # Minimum price of the day (ct/kWh)
day_price_max: 2200.0 # Maximum price of the day (ct/kWh)

View file

@ -8,6 +8,8 @@ comments: false
> **Tip:** Many sensors have dynamic icons and colors! See the **[Dynamic Icons Guide](dynamic-icons.md)** and **[Dynamic Icon Colors Guide](icon-colors.md)** to enhance your dashboards.
> **Entity ID tip:** `<home_name>` is a placeholder for your Tibber home display name in Home Assistant. Entity IDs are derived from the displayed name (localized), so the exact slug may differ. Example suffixes below use the English display names (en.json) as a baseline. You can find the real ID in **Settings → Devices & Services → Entities** (or **Developer Tools → States**).
## Binary Sensors
### Best Price Period & Peak Price Period
@ -83,9 +85,9 @@ sensor:
daily_price_analysis:
friendly_name: "Daily Price Analysis"
value_template: >
{% set median = state_attr('sensor.tibber_home_average_price_today', 'price_median') %}
{% set mean = state_attr('sensor.tibber_home_average_price_today', 'price_mean') %}
{% set current = states('sensor.tibber_home_current_interval_price') | float %}
{% set median = state_attr('sensor.<home_name>_price_today', 'price_median') %}
{% set mean = state_attr('sensor.<home_name>_price_today', 'price_mean') %}
{% set current = states('sensor.<home_name>_current_electricity_price') | float %}
{% if current < median %}
Below typical ({{ ((1 - current/median) * 100) | round(1) }}% cheaper)
@ -107,14 +109,14 @@ automation:
- alias: "Start Dishwasher When Cheap"
trigger:
- platform: state
entity_id: binary_sensor.tibber_home_best_price_period
entity_id: binary_sensor.<home_name>_best_price_period
to: "on"
condition:
# Only if current price is at least 20% below typical (median)
- condition: template
value_template: >
{% set current = states('sensor.tibber_home_current_interval_price') | float %}
{% set median = state_attr('sensor.tibber_home_average_price_today', 'price_median') | float %}
{% set current = states('sensor.<home_name>_current_electricity_price') | float %}
{% set median = state_attr('sensor.<home_name>_price_today', 'price_median') | float %}
{{ current < (median * 0.8) }}
action:
- service: switch.turn_on
@ -134,7 +136,7 @@ automation:
action:
# Calculate expected daily heating cost
- variables:
mean_price: "{{ state_attr('sensor.tibber_home_average_price_today', 'price_mean') | float }}"
mean_price: "{{ state_attr('sensor.<home_name>_price_today', 'price_mean') | float }}"
heating_kwh_per_day: 15 # Estimated consumption
daily_cost: "{{ (mean_price * heating_kwh_per_day / 100) | round(2) }}"
- service: notify.mobile_app
@ -157,8 +159,8 @@ automation:
# Start charging if current price < 90% of recent 24h average
- condition: template
value_template: >
{% set current = states('sensor.tibber_home_current_interval_price') | float %}
{% set trailing_avg = state_attr('sensor.tibber_home_trailing_price_average', 'price_median') | float %}
{% set current = states('sensor.<home_name>_current_electricity_price') | float %}
{% set trailing_avg = state_attr('sensor.<home_name>_price_trailing_24h', 'price_median') | float %}
{{ current < (trailing_avg * 0.9) }}
# And battery < 80%
- condition: numeric_state
@ -203,9 +205,103 @@ All average sensors provide these attributes:
## Statistical Sensors
## Volatility Sensors
Coming soon...
Volatility sensors help you understand how much electricity prices fluctuate over a given period. Instead of just looking at the absolute price, they measure the **relative price variation**, which is a great indicator of whether it's a good day for price-based energy optimization.
The calculation is based on the **Coefficient of Variation (CV)**, a standardized statistical measure defined as:
`CV = (Standard Deviation / aAithmetic Mean) * 100%`
This results in a percentage that shows how much prices deviate from the average. A low CV means stable prices, while a high CV indicates significant price swings and thus, a high potential for saving money by shifting consumption.
The sensor's state can be `low`, `moderate`, `high`, or `very_high`, based on configurable thresholds.
### Available Volatility Sensors
| Sensor | Description | Time Window |
|---|---|---|
| **Today's Price Volatility** | Volatility for the current calendar day | 00:00 - 23:59 today |
| **Tomorrow's Price Volatility** | Volatility for the next calendar day | 00:00 - 23:59 tomorrow |
| **Next 24h Price Volatility** | Volatility for the next 24 hours from now | Rolling 24h forward |
| **Today + Tomorrow Price Volatility** | Volatility across both today and tomorrow | Up to 48 hours |
### Configuration
You can adjust the CV thresholds that determine the volatility level:
1. Go to **Settings → Devices & Services → Tibber Prices**.
2. Click **Configure**.
3. Go to the **Price Volatility Thresholds** step.
Default thresholds are:
- **Moderate:** 15%
- **High:** 30%
- **Very High:** 50%
### Key Attributes
All volatility sensors provide these attributes:
| Attribute | Description | Example |
|---|---|---|
| `price_coefficient_variation_%` | The calculated Coefficient of Variation | `23.5` |
| `price_spread` | The difference between the highest and lowest price | `12.3` |
| `price_min` | The lowest price in the period | `10.2` |
| `price_max` | The highest price in the period | `22.5` |
| `price_mean` | The arithmetic mean of all prices in the period | `15.1` |
| `interval_count` | Number of price intervals included in the calculation | `96` |
### Usage in Automations & Best Practices
You can use the volatility sensor to decide if a price-based optimization is worth it. For example, if your solar battery has conversion losses, you might only want to charge and discharge it on days with high volatility.
**Best Practice: Use the `price_volatility` Attribute**
For automations, it is strongly recommended to use the `price_volatility` attribute instead of the sensor's main state.
- **Why?** The main `state` of the sensor is translated into your Home Assistant language (e.g., "Hoch" in German). If you change your system language, automations based on this state will break. The `price_volatility` attribute is **always in lowercase English** (`"low"`, `"moderate"`, `"high"`, `"very_high"`) and therefore provides a stable, language-independent value.
**Good Example (Robust Automation):**
This automation triggers only if the volatility is classified as `high` or `very_high`, respecting your central settings and working independently of the system language.
```yaml
automation:
- alias: "Enable battery optimization only on volatile days"
trigger:
- platform: template
value_template: >
{{ state_attr('sensor.<home_name>_today_s_price_volatility', 'price_volatility') in ['high', 'very_high'] }}
action:
- service: input_boolean.turn_on
entity_id: input_boolean.battery_optimization_enabled
```
---
**Avoid Hard-Coding Numeric Thresholds**
You might be tempted to use the numeric `price_coefficient_variation_%` attribute directly in your automations. This is not recommended.
- **Why?** The integration provides central configuration options for the volatility thresholds. By using the classified `price_volatility` attribute, your automations automatically adapt if you decide to change what you consider "high" volatility (e.g., changing the threshold from 30% to 35%). Hard-coding values means you would have to find and update them in every single automation.
**Bad Example (Brittle Automation):**
This automation uses a hard-coded value. If you later change the "High" threshold in the integration's options to 35%, this automation will not respect that change and might trigger at the wrong time.
```yaml
automation:
- alias: "Brittle - Enable battery optimization"
trigger:
#
# BAD: Avoid hard-coding numeric values
#
- platform: numeric_state
entity_id: sensor.<home_name>_today_s_price_volatility
attribute: price_coefficient_variation_%
above: 30
action:
- service: input_boolean.turn_on
entity_id: input_boolean.battery_optimization_enabled
```
By following the "Good Example", your automations become simpler, more readable, and much easier to maintain.
## Rating Sensors
@ -215,7 +311,7 @@ Coming soon...
### Chart Metadata
**Entity ID:** `sensor.tibber_home_NAME_chart_metadata`
**Entity ID:** `sensor.<home_name>_chart_metadata`
> **✨ New Feature**: This sensor provides dynamic chart configuration metadata for optimal visualization. Perfect for use with the `get_apexcharts_yaml` action!
@ -247,7 +343,7 @@ See the **[Chart Examples Guide](chart-examples.md)** for practical examples!
### Chart Data Export
**Entity ID:** `sensor.tibber_home_NAME_chart_data_export`
**Entity ID:** `sensor.<home_name>_chart_data_export`
**Default State:** Disabled (must be manually enabled)
> **⚠️ Legacy Feature**: This sensor is maintained for backward compatibility. For new integrations, use the **`tibber_prices.get_chartdata`** service instead, which offers more flexibility and better performance.
@ -295,7 +391,7 @@ See the `tibber_prices.get_chartdata` service documentation below for a complete
# ApexCharts card consuming the sensor
type: custom:apexcharts-card
series:
- entity: sensor.tibber_home_chart_data_export
- entity: sensor.<home_name>_chart_data_export
data_generator: |
return entity.attributes.data;
```
@ -308,7 +404,7 @@ If you're currently using this sensor, consider migrating to the service:
# Old approach (sensor)
- service: apexcharts_card.update
data:
entity: sensor.tibber_home_chart_data_export
entity: sensor.<home_name>_chart_data_export
# New approach (service)
- service: tibber_prices.get_chartdata