v0.14.2
This commit is contained in:
@@ -56,6 +56,15 @@ pub(crate) fn record_cumulative_energy_sample(
|
||||
reset_detected,
|
||||
};
|
||||
state.db.add_energy_reading(&reading)?;
|
||||
state.broadcast(
|
||||
"energy.updated",
|
||||
json!({
|
||||
"target_id": reading.device_id.clone(),
|
||||
"source": reading.source.clone(),
|
||||
"total_kwh": reading.normalized_meter_kwh,
|
||||
"timestamp": reading.timestamp,
|
||||
}),
|
||||
);
|
||||
queue_influx_energy(state, reading.clone());
|
||||
Ok(reading)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user