Replies: 1 comment 5 replies
-
Cool plot and use case! You can use the xaxis of wind and a fixed value for nuclear: - entity: sensor.national_grid_wind_forecast_fourteen_day # note this is wind
name: Nuclear projected from generation_nuclear_mw # note the name is nuclear
showlegend: false
fillcolor: gold
stackgroup: 1
filters:
- fn: |-
({ meta }) => ({
xs: meta.forecast.map(({ start_time }) => new Date(start_time)),
ys: meta.forecast.map(() => hass.states["sensor.national_grid_grid_generation_nuclear_mw"].state * 0.001),
})
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I use a forecast chart to look for the best upcoming nights to charge an EV. For example I will try to run the battery low for Sunday night/Monday morning (11th) - when demand drops nearest to the renewables, carbon load will be lowest and in many cases I'll also get a cheaper electricity rate because my tariff tracks the wholesale price every 30 minutes and renewables are cheap...
The UK electricity system operator doesn't provide a forecast for nuclear, so I've synthesised one in a template sensor using the current value. The standard UK practice is that nuclear provides the base generation, and doesn't change very often (it's been pretty static the last 7 days so static is the best assumption for the next period.)
As you should see, the template just copies the timestamps from the wind forecast and substitutes the current state of nuclear generation for every future value.
This feels a bit kludgey and non-optimal though it works very well as you see in the screenshot. It feels like I ought to be able to do this simple forward projection in a plotly function but I've had a play and I can't find a way to project the current value forward - should I keep trying or am I already at the best solution?
Thanks in advance for any guidance!
Beta Was this translation helpful? Give feedback.
All reactions