stupid mistake with last refresh time

This commit is contained in:
Alex Janka 2024-01-15 08:56:56 +11:00
parent 41a41c7a9e
commit 8f419109c3
3 changed files with 2 additions and 3 deletions

2
Cargo.lock generated
View file

@ -2256,7 +2256,7 @@ dependencies = [
[[package]]
name = "tesla-charge-controller"
version = "0.2.0"
version = "0.2.1"
dependencies = [
"async-channel",
"chrono",

View file

@ -1,6 +1,6 @@
[package]
name = "tesla-charge-controller"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
license = "MITNFA"
description = "Controls Tesla charge rate based on solar charge data"

View file

@ -140,7 +140,6 @@ impl TeslaInterface {
match get_state(&self.api, self.vehicle.id, &mut self.last_cop_state).await {
Ok(new_state) => {
self.metrics.tesla_online.set(1.);
self.last_refresh = Instant::now();
let mut state = self
.state
.write()