stupid mistake with last refresh time
This commit is contained in:
parent
41a41c7a9e
commit
8f419109c3
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -2256,7 +2256,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tesla-charge-controller"
|
name = "tesla-charge-controller"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel",
|
"async-channel",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tesla-charge-controller"
|
name = "tesla-charge-controller"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MITNFA"
|
license = "MITNFA"
|
||||||
description = "Controls Tesla charge rate based on solar charge data"
|
description = "Controls Tesla charge rate based on solar charge data"
|
||||||
|
|
|
@ -140,7 +140,6 @@ impl TeslaInterface {
|
||||||
match get_state(&self.api, self.vehicle.id, &mut self.last_cop_state).await {
|
match get_state(&self.api, self.vehicle.id, &mut self.last_cop_state).await {
|
||||||
Ok(new_state) => {
|
Ok(new_state) => {
|
||||||
self.metrics.tesla_online.set(1.);
|
self.metrics.tesla_online.set(1.);
|
||||||
self.last_refresh = Instant::now();
|
|
||||||
let mut state = self
|
let mut state = self
|
||||||
.state
|
.state
|
||||||
.write()
|
.write()
|
||||||
|
|
Loading…
Reference in a new issue