Paráda, díky moc. Nakonec to mám v podstatě podobně.
1 Like
Uměl by někdo takový graf pro ApexCharts s integrací GitHub - rnovacek/homeassistant_cz_energy_spot_prices: Home Assistant integration that provides current Czech electricity spot prices based on OTE. ?
type: custom:apexcharts-card
graph_span: 1d
update_interval: 1min
stacked: true
header:
show: true
title: Today Electricity price
show_states: true
colorize_states: true
now:
show: true
label: now
all_series_config:
type: column
stroke_width: 2
float_precision: 2
unit: kč/kWh
show:
legend_value: false
in_header: false
group_by:
func: avg
duration: 1h
span:
start: day
series:
- entity: sensor.current_market_price_czk_kwh
name: Distribution
color: blue
data_generator: |
return entity.attributes.today_hourly_prices.map((price, index) => {
const date = new Date()
date.setHours(index)
date.setMinutes(0)
date.setSeconds(0)
return [date, 0.206];
});
- entity: sensor.current_market_price_czk_kwh
name: OZE
color: gray
data_generator: |
return entity.attributes.today_hourly_prices.map((price, index) => {
const date = new Date()
date.setHours(index)
date.setMinutes(0)
date.setSeconds(0)
return [date, 0.49];
});
- entity: sensor.current_market_price_czk_kwh
name: Services
color: pink
data_generator: |
return entity.attributes.today_hourly_prices.map((price, index) => {
const date = new Date()
date.setHours(index)
date.setMinutes(0)
date.setSeconds(0)
return [date, 0.17];
});
- entity: sensor.current_market_price_czk_kwh
name: Fee
color: purple
data_generator: |
return entity.attributes.today_hourly_prices.map((price, index) => {
const date = new Date()
date.setHours(index)
date.setMinutes(0)
date.setSeconds(0)
return [date, 0.35];
});
- entity: sensor.current_market_price_czk_kwh
name: Electricity
color: green
data_generator: |
return entity.attributes.today_hourly_prices.map((price, index) => {
const date = new Date()
date.setHours(index)
date.setMinutes(0)
date.setSeconds(0)
return [date, price];
});
- entity: sensor.current_market_price_czk_kwh
name: DPH
color: red
data_generator: |
return entity.attributes.today_hourly_prices.map((price, index) => {
const date = new Date()
date.setHours(index)
date.setMinutes(0)
date.setSeconds(0)
return [date, (price + 0.35 + 0.17 + 0.49 + 0.206)*0.21];
});
- entity: sensor.current_market_price_czk_kwh
name: Total
type: line
show:
in_header: true
data_generator: |
return entity.attributes.today_hourly_prices.map((price, index) => {
const date = new Date()
date.setHours(index)
date.setMinutes(0)
date.setSeconds(0)
return [date, (price + 0.35 + 0.17 + 0.49 + 0.206)*1.21];
});
- entity: sensor.current_market_price_czk_kwh
name: FIX
type: line
color: yellow
opacity: 0.8
stroke_width: 2
stroke_dash: 10
show:
in_header: true
data_generator: |
return entity.attributes.today_hourly_prices.map((price, index) => {
const date = new Date()
date.setHours(index)
date.setMinutes(0)
date.setSeconds(0)
return [date, (2.8 + 0.17 + 0.49 + 0.206)*1.21];
});