pub struct AddOutputParams {Show 18 fields
pub date: Date,
pub generated: Option<u32>,
pub exported: Option<u32>,
pub peak: Option<u32>,
pub peak_time: Option<Time>,
pub conditions: Option<Conditions>,
pub min_temp: Option<f32>,
pub max_temp: Option<f32>,
pub comment: Option<String>,
pub import_peak: Option<u32>,
pub import_off_peak: Option<u32>,
pub import_shoulder: Option<u32>,
pub import_high_shoulder: Option<u32>,
pub consumption: Option<u32>,
pub export_peak: Option<u32>,
pub export_off_peak: Option<u32>,
pub export_shoulder: Option<u32>,
pub export_high_shoulder: Option<u32>,
}Expand description
Parameters for the add_outputs endpoint.
§Example
AddOutputParams::new can be used to create a parameter struct with all other fields set to None.
This can be used to easily create parameters with only one or two fields set:
use pvoutput_client::types::{Conditions, params::AddOutputParams};
use jiff::civil::Date;
let params = AddOutputParams {
generated: Some(1_500),
conditions: Some(Conditions::Cloudy),
..AddOutputParams::new(Date::constant(2025, 09, 22))
};Fields§
§date: DateOutput date.
Must be after 2000-01-01 and not in the future.
generated: Option<u32>Power generated in watt-hours. This is required if an output does not yet exist for this date.
exported: Option<u32>Power exported in watt-hours.
peak: Option<u32>Peak power output in watts.
peak_time: Option<Time>The time at which the peak output was recorded.
Seconds will be truncated – 11:15:05 becomes 11:15.
conditions: Option<Conditions>The day’s weather conditions.
min_temp: Option<f32>The minimum recorded temperature in degrees Celsius.
If set, a maximum temperature must also be provided, and the minimum temperature must be lower than the maximum temperature.
Both temperatures must be between -100.0 and 100.0.
max_temp: Option<f32>The maximum recorded temperature in degrees Celsius.
If set, a minimum temperature must also be provided, and the minimum temperature must be lower than the maximum temperature.
Both temperatures must be between -100.0 and 100.0.
comment: Option<String>A comment.
import_peak: Option<u32>The amount of energy imported during the peak tariff in watt-hours.
import_off_peak: Option<u32>The amount of energy imported during the off-peak tariff in watt-hours.
import_shoulder: Option<u32>The amount of energy imported during the shoulder tariff in watt-hours.
import_high_shoulder: Option<u32>The amount of energy imported during the high-shoulder tariff in watt-hours.
consumption: Option<u32>Energy consumption in watt-hours.
Limited to 999,999,999 Wh.
export_peak: Option<u32>The amount of energy exported during the peak tariff in watt-hours.
export_off_peak: Option<u32>The amount of energy exported during the off-peak tariff in watt-hours.
export_shoulder: Option<u32>The amount of energy exported during the shoulder tariff in watt-hours.
export_high_shoulder: Option<u32>The amount of energy exported during the high-shoulder tariff in watt-hours.
Implementations§
Source§impl AddOutputParams
impl AddOutputParams
Sourcepub const fn new(date: Date) -> Self
pub const fn new(date: Date) -> Self
Creates a new AddOutputParams for the given date with all other fields set to None.
Trait Implementations§
Source§impl Clone for AddOutputParams
impl Clone for AddOutputParams
Source§fn clone(&self) -> AddOutputParams
fn clone(&self) -> AddOutputParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more