v0.11.0
This commit is contained in:
@@ -25,6 +25,21 @@ pub struct Schedule {
|
||||
pub flow_node_id: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)]
|
||||
pub struct FlowRuntimeNodeState {
|
||||
#[serde(default)]
|
||||
pub since: Option<DateTime<Utc>>,
|
||||
#[serde(default)]
|
||||
pub samples: Vec<FlowRuntimeSample>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
pub struct FlowRuntimeSample {
|
||||
pub at: DateTime<Utc>,
|
||||
pub value: f64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Automation {
|
||||
pub id: String,
|
||||
@@ -59,6 +74,14 @@ pub struct Automation {
|
||||
pub action_zone_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub action_zone_preset: Option<String>,
|
||||
#[serde(default)]
|
||||
pub action_ha_domain: Option<String>,
|
||||
#[serde(default)]
|
||||
pub action_ha_service: Option<String>,
|
||||
#[serde(default)]
|
||||
pub action_ha_entity_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub action_ha_data: Value,
|
||||
/// Topologically ordered condition/logic program compiled from the visual Flow graph.
|
||||
#[serde(default)]
|
||||
pub flow_conditions: Vec<FlowCondition>,
|
||||
@@ -66,6 +89,9 @@ pub struct Automation {
|
||||
pub flow_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub flow_node_id: Option<String>,
|
||||
/// Durable state for stateful Flow blocks (stable-for and rolling statistics).
|
||||
#[serde(default)]
|
||||
pub flow_runtime: BTreeMap<String, FlowRuntimeNodeState>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub updated_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user