akkudoktoreos.core.coreabc.get_prediction

akkudoktoreos.core.coreabc.get_prediction(init: bool = False) Prediction

Retrieve the singleton EOS Prediction instance.

This function provides access to the global EOS Prediction object. The Prediction instance is created on first access if init is True. If the instance is accessed before initialization and init is False, a RuntimeError is raised.

Parameters:

init (bool) – If True, create the Prediction instance if it does not exist. Default is False.

Returns:

The global EOS Prediction instance.

Return type:

Prediction

Raises:

RuntimeError – If accessed before initialization with init=False.

Usage:
prediction = get_prediction(init=True)  # Initialize and retrieve
prediction.forecast_next_hour()