use crate::brain::python_like::modes::heating_mode::TargetTemperature;
use crate::io::temperatures::Sensor;
use serde::Deserialize;
use serde_with::serde_as;
use serde_with::DurationSeconds;
use std::time::Duration;
#[serde_as]
#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct MinHeatPumpRuntime {
#[serde_as(as = "DurationSeconds")]
duration_secs: Duration,
safety_cut_off: TargetTemperature,
}
impl Default for MinHeatPumpRuntime {
fn default() -> Self {
Self {
duration_secs: Duration::from_secs(6 * 60),
safety_cut_off: TargetTemperature::new(Sensor::HPRT, 50.0),
}
}
}