hass.tibber_prices/custom_components/tibber_prices/services.yaml
Julian Pawlowski b23697036a fix
2025-05-21 02:37:41 +00:00

113 lines
3.8 KiB
YAML

get_price:
name: Get Tibber Price Info
description: >-
Returns merged priceInfo and priceRating for the requested day and config entry. Optionally, you can simulate the response as if it were a specific time-of-day (time, format HH:mm or HH:mm:ss), which only affects the previous/current/next fields, not the prices list. The simulated time is always combined with the selected day.
fields:
entry_id:
name: Entry ID
description: The config entry ID for the Tibber integration.
required: true
example: "1234567890abcdef"
selector:
config_entry:
integration: tibber_prices
day:
name: Day
description: Which day to fetch prices for (yesterday, today, or tomorrow).
required: false
default: today
example: today
selector:
select:
options:
- yesterday
- today
- tomorrow
time:
name: Time
description: >-
Time-of-day in HH:mm or HH:mm:ss format. If provided, simulates the response as if this were the current time for interval selection (previous/current/next) for the selected day. Does not filter the prices list. Example: "15:00" or "15:00:00".
required: false
selector:
time:
get_apexcharts_data:
name: Get ApexCharts Data
description: >-
Returns data for an ApexCharts card visualizing Tibber Prices for the selected day.
fields:
entity_id:
name: Entity ID
description: The entity_id for the Tibber price sensor to determine the config entry ID.
required: true
example: sensor.tibber_price_today
selector:
entity:
domain: sensor
integration: tibber_prices
day:
name: Day
description: Which day to visualize (yesterday, today, or tomorrow).
required: true
default: today
example: today
selector:
select:
options:
- yesterday
- today
- tomorrow
level_type:
name: Level Type
description: >-
Select what data to return: 'rating_level' (the current official Tibber integration price level: LOW/NORMAL/HIGH) or 'level' (the original Tibber API price level: VERY_CHEAP, CHEAP, NORMAL, EXPENSIVE, VERY_EXPENSIVE).
required: true
default: rating_level
example: rating_level
selector:
select:
options:
- level
- rating_level
level_key:
name: Level Key
description: >-
Select the key to use for the level type: For 'rating_level', use LOW/NORMAL/HIGH. For 'level', use VERY_CHEAP/CHEAP/LOW/NORMAL/HIGH/EXPENSIVE/VERY_EXPENSIVE.
required: true
default: NORMAL
example: NORMAL
selector:
select:
options:
- VERY_CHEAP
- CHEAP
- LOW
- NORMAL
- HIGH
- EXPENSIVE
- VERY_EXPENSIVE
get_apexcharts_yaml:
name: Get ApexCharts Card YAML
description: >-
Returns a ready-to-copy YAML snippet for an ApexCharts card visualizing Tibber Prices for the selected day. Use this to easily add a pre-configured chart to your dashboard. The YAML will use the get_price service for data.
fields:
entity_id:
name: Entity ID
description: The entity_id for the Tibber price sensor (used for context, but the chart fetches data via the service).
required: true
example: sensor.tibber_price_today
selector:
entity:
domain: sensor
integration: tibber_prices
day:
name: Day
description: Which day to visualize (yesterday, today, or tomorrow).
required: false
default: today
example: today
selector:
select:
options:
- yesterday
- today
- tomorrow