Solar / Grid Power with hourly yield / consumption overlay #191
Replies: 6 comments 9 replies
-
Really cool, thanks for sharing! By the way, to get syntax colouring in the code snippet you have to write it like this: |
Beta Was this translation helpful? Give feedback.
-
Hi, this looks cool @rwegnerGermany ! It just shows the cummulative value, rather than the hourly yield... but that happens only after midnight : type: custom:plotly-graph
entities:
- entity: sensor.solarnet_energy_day
name: Hourly Yield
statistic: state
period: hour
filters:
- fn: |-
(params) => {
const ys = [];
ys.push(0); # to have same number of elements as xs
# compute delta to previous hour
for (let i = 1; i < params.statistics.length; i++){
ys.push(params.statistics[i].state-params.statistics[i-1].state);
}
return { ys };
}
type: bar
marker:
color: orange
- entity: sensor.solarnet_power_photovoltaics
line:
width: 2
color: tomato
- entity: sensor.sh_used_power_1min
line:
width: 1
color: cyan
- entity: sensor.solcast_forecast_next_hour
time_offset: 45m
line:
color: MediumSeaGreen
width: 1.5
refresh_interval: 10
hours_to_show: 14
layout:
height: 650
yaxis:
showgrid: false
side: right
rangemode: nonnegative
yaxis2:
showgrid: true
side: left
rangemode: nonnegative
dragmode: pan
xaxis:
rangeselector:
'y': 1.2
buttons:
- count: 1
step: minute
- count: 1
step: hour
- count: 6
step: hour
- count: 1
step: day
- count: 3
step: day |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Basic configuration: type: custom:plotly-graph
entities:
- entity: sensor.sma_daily_yield
name: SMA Hourly Yield
statistic: state
period: hour
filters:
- fn: |-
(params) => {
const ys = [];
ys.push(0);
for (let i = 1; i < params.statistics.length; i++){
ys.push(params.statistics[i].state-params.statistics[i-1].state);
}
return { ys };
}
type: bar
marker:
color: rgba(44,160,44,0.6)
refresh_interval: 30
hours_to_show: 14
layout:
height: 400
Just a few page reloads and a bit of luck. Haven't even entered card code editing in between of these 2 screen shots. Ah, funny. By accident I just zoomed with my touchpad and the bars became narrow and stayed like this. But not allways and clicking reset usually sets to normal width. After each zoom operation the bar width is somewhat random. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I had a graph for solar power production (raw and 10min avg) and the yield forecast overlayed.
To check the quality of the yield forecast, I had the idea to also overlay the actual hourly yield.
Beta Was this translation helpful? Give feedback.
All reactions