refactor(docs): update terminology from "services" to "actions" for clarity and consistency

This commit is contained in:
Julian Pawlowski 2025-12-02 18:35:59 +00:00
parent 97db134ed5
commit ab9735928a
4 changed files with 24 additions and 22 deletions

View file

@ -29,7 +29,7 @@ A Home Assistant integration that provides advanced price information and rating
- **Price Ratings**: Quarter-hourly ratings comparing current prices to 24-hour trailing averages - **Price Ratings**: Quarter-hourly ratings comparing current prices to 24-hour trailing averages
- **Smart Indicators**: Binary sensors to detect peak hours and best price hours for automations - **Smart Indicators**: Binary sensors to detect peak hours and best price hours for automations
- **Intelligent Caching**: Minimizes API calls while ensuring data freshness across Home Assistant restarts - **Intelligent Caching**: Minimizes API calls while ensuring data freshness across Home Assistant restarts
- **Custom Services**: API endpoints for advanced integrations (ApexCharts support included) - **Custom Actions** (backend services): API endpoints for advanced integrations (ApexCharts support included)
- **Diagnostic Sensors**: Monitor data freshness and availability - **Diagnostic Sensors**: Monitor data freshness and availability
- **Reliable API Usage**: Uses only official Tibber [`priceInfo`](https://developer.tibber.com/docs/reference#priceinfo) and [`priceInfoRange`](https://developer.tibber.com/docs/reference#subscription) endpoints - no legacy APIs. Price ratings and statistics are calculated locally for maximum reliability and future-proofing. - **Reliable API Usage**: Uses only official Tibber [`priceInfo`](https://developer.tibber.com/docs/reference#priceinfo) and [`priceInfoRange`](https://developer.tibber.com/docs/reference#subscription) endpoints - no legacy APIs. Price ratings and statistics are calculated locally for maximum reliability and future-proofing.
@ -308,19 +308,19 @@ template:
📖 **[View all sensors and attributes →](docs/user/sensors.md)** 📖 **[View all sensors and attributes →](docs/user/sensors.md)**
### Custom Services ### Custom Actions
The integration provides custom services for advanced use cases: The integration provides custom actions (they still appear as services under the hood) for advanced use cases. These actions show up in Home Assistant under **Developer Tools → Actions**.
- `tibber_prices.get_chartdata` - Get price data in chart-friendly formats for any visualization card - `tibber_prices.get_chartdata` - Get price data in chart-friendly formats for any visualization card
- `tibber_prices.get_apexcharts_yaml` - Generate complete ApexCharts configurations - `tibber_prices.get_apexcharts_yaml` - Generate complete ApexCharts configurations
- `tibber_prices.refresh_user_data` - Manually refresh account information - `tibber_prices.refresh_user_data` - Manually refresh account information
📖 **[Service documentation and examples →](docs/user/services.md)** 📖 **[Action documentation and examples →](docs/user/actions.md)**
### ApexCharts Integration ### ApexCharts Integration
The integration includes built-in support for creating beautiful price visualization cards. Use the `get_apexcharts_yaml` service to generate card configurations automatically. The integration includes built-in support for creating beautiful price visualization cards. Use the `get_apexcharts_yaml` action to generate card configurations automatically.
📖 **[ApexCharts examples →](docs/user/automation-examples.md#apexcharts-cards)** 📖 **[ApexCharts examples →](docs/user/automation-examples.md#apexcharts-cards)**

View file

@ -10,7 +10,7 @@ Welcome to Tibber Prices! This integration provides enhanced electricity price d
- **[Sensors](sensors.md)** - Available sensors, their states, and attributes - **[Sensors](sensors.md)** - Available sensors, their states, and attributes
- **[Dynamic Icons](dynamic-icons.md)** - State-based automatic icon changes - **[Dynamic Icons](dynamic-icons.md)** - State-based automatic icon changes
- **[Dynamic Icon Colors](icon-colors.md)** - Using icon_color attribute for color-coded dashboards - **[Dynamic Icon Colors](icon-colors.md)** - Using icon_color attribute for color-coded dashboards
- **[Services](services.md)** - Custom services and how to use them - **[Actions](actions.md)** - Custom actions (service endpoints) and how to use them
- **[Automation Examples](automation-examples.md)** - Ready-to-use automation recipes - **[Automation Examples](automation-examples.md)** - Ready-to-use automation recipes
- **[Troubleshooting](troubleshooting.md)** - Common issues and solutions - **[Troubleshooting](troubleshooting.md)** - Common issues and solutions
@ -28,7 +28,7 @@ Welcome to Tibber Prices! This integration provides enhanced electricity price d
- **Statistical analysis** - Trailing/leading 24h averages for context - **Statistical analysis** - Trailing/leading 24h averages for context
- **Price ratings** - LOW/NORMAL/HIGH classification based on your thresholds - **Price ratings** - LOW/NORMAL/HIGH classification based on your thresholds
- **Best/Peak hour detection** - Automatic detection of cheapest/peak periods with configurable filters ([learn how](period-calculation.md)) - **Best/Peak hour detection** - Automatic detection of cheapest/peak periods with configurable filters ([learn how](period-calculation.md))
- **ApexCharts integration** - Custom services for beautiful price charts - **ApexCharts integration** - Custom actions for beautiful price charts
- **Multi-currency support** - EUR, NOK, SEK with proper minor units (ct, øre, öre) - **Multi-currency support** - EUR, NOK, SEK with proper minor units (ct, øre, öre)
## 🔗 Useful Links ## 🔗 Useful Links

View file

@ -1,8 +1,10 @@
# Services # Actions (Services)
This integration provides several services for advanced price data access and manipulation. Home Assistant now surfaces these backend service endpoints as **Actions** in the UI (for example, Developer Tools → Actions or the Action editor inside dashboards). Behind the scenes they are still Home Assistant services that use the `service:` key, but this guide uses the word “action” whenever we refer to the user interface.
## Available Services You can still call them from automations, scripts, and dashboards the same way as before (`service: tibber_prices.get_chartdata`, etc.), just remember that the frontend officially lists them as actions.
## Available Actions
### tibber_prices.get_chartdata ### tibber_prices.get_chartdata
@ -104,19 +106,19 @@ data:
**Complete Documentation:** **Complete Documentation:**
For detailed parameter descriptions, see the service definition in **Developer Tools → Services → tibber_prices.get_chartdata** or check the inline documentation in the integration's `services.yaml` file. For detailed parameter descriptions, open **Developer Tools → Actions** (the UI label) and select `tibber_prices.get_chartdata`. The inline documentation is still stored in `services.yaml` because actions are backed by services.
--- ---
### tibber_prices.get_apexcharts_yaml ### tibber_prices.get_apexcharts_yaml
> ⚠️ **IMPORTANT:** This service generates a **basic example configuration** as a starting point, NOT a complete solution for all ApexCharts features. > ⚠️ **IMPORTANT:** This action generates a **basic example configuration** as a starting point, NOT a complete solution for all ApexCharts features.
> >
> This integration is primarily a **data provider**. The generated YAML demonstrates how to use the `get_chartdata` service to fetch price data. Due to the segmented nature of our data (different time periods per series) and the use of Home Assistant's service API instead of entity attributes, many advanced ApexCharts features (like `in_header`, certain transformations) are **not compatible** or require manual customization. > This integration is primarily a **data provider**. The generated YAML demonstrates how to use the `get_chartdata` action to fetch price data. Due to the segmented nature of our data (different time periods per series) and the use of Home Assistant's service API instead of entity attributes, many advanced ApexCharts features (like `in_header`, certain transformations) are **not compatible** or require manual customization.
> >
> **You are welcome to customize** the generated YAML for your specific needs, but comprehensive ApexCharts configuration support is beyond the scope of this integration. Community contributions with improved configurations are always appreciated! > **You are welcome to customize** the generated YAML for your specific needs, but comprehensive ApexCharts configuration support is beyond the scope of this integration. Community contributions with improved configurations are always appreciated!
> >
> **For custom solutions:** Use the `get_chartdata` service directly to build your own charts with full control over the data format and visualization. > **For custom solutions:** Use the `get_chartdata` action directly to build your own charts with full control over the data format and visualization.
**Purpose:** Generates a basic ApexCharts card YAML configuration example for visualizing electricity prices. **Purpose:** Generates a basic ApexCharts card YAML configuration example for visualizing electricity prices.
@ -134,7 +136,7 @@ data:
response_variable: apexcharts_config response_variable: apexcharts_config
``` ```
**Rolling Window Mode:** When omitting the `day` parameter, the service generates a dynamic 48-hour rolling window that automatically shows: **Rolling Window Mode:** When omitting the `day` parameter, the action generates a dynamic 48-hour rolling window that automatically shows:
- Today + Tomorrow (when tomorrow data is available) - Today + Tomorrow (when tomorrow data is available)
- Yesterday + Today (when tomorrow data is not yet available) - Yesterday + Today (when tomorrow data is not yet available)
@ -142,7 +144,7 @@ This mode requires the Config Template Card to dynamically adjust the time windo
Use the response in Lovelace dashboards by copying the generated YAML. Use the response in Lovelace dashboards by copying the generated YAML.
**Documentation:** See Developer Tools → Services for parameter details. **Documentation:** Refer to **Developer Tools → Actions** for descriptions of the fields exposed by this action.
--- ---
@ -158,13 +160,13 @@ data:
entry_id: YOUR_ENTRY_ID entry_id: YOUR_ENTRY_ID
``` ```
**Note:** User data is cached for 24 hours. Use this service only when you need immediate updates (e.g., after changing Tibber subscriptions). **Note:** User data is cached for 24 hours. Trigger this action only when you need immediate updates (e.g., after changing Tibber subscriptions).
--- ---
## Migration from Chart Data Export Sensor ## Migration from Chart Data Export Sensor
If you're currently using the `sensor.tibber_home_chart_data_export` sensor, consider migrating to `tibber_prices.get_chartdata`: If you're still using the `sensor.tibber_home_chart_data_export` sensor, consider migrating to the `tibber_prices.get_chartdata` action:
**Benefits:** **Benefits:**
@ -176,6 +178,6 @@ If you're currently using the `sensor.tibber_home_chart_data_export` sensor, con
**Migration Steps:** **Migration Steps:**
1. Note your current sensor configuration (Step 7 in Options Flow) 1. Note your current sensor configuration (Step 7 in Options Flow)
2. Create automation/script using `tibber_prices.get_chartdata` with same parameters 2. Create automation/script that calls `tibber_prices.get_chartdata` with the same parameters
3. Test the new approach 3. Test the new approach
4. Disable the old sensor when satisfied 4. Disable the old sensor when satisfied

View file

@ -665,7 +665,7 @@ These attributes allow automations to check: "Is the classification meaningful o
For advanced configuration patterns and technical deep-dive, see: For advanced configuration patterns and technical deep-dive, see:
- [Automation Examples](./automation-examples.md) - Real-world automation patterns - [Automation Examples](./automation-examples.md) - Real-world automation patterns
- [Services](./services.md) - Using the `tibber_prices.get_chartdata` service for custom visualizations - [Actions](./actions.md) - Using the `tibber_prices.get_chartdata` action for custom visualizations
### Quick Reference ### Quick Reference