fix api interface saving etc
All checks were successful
Build .deb on release / Build-Deb (push) Successful in 2m12s
All checks were successful
Build .deb on release / Build-Deb (push) Successful in 2m12s
This commit is contained in:
parent
a762ccbcdc
commit
40817a7419
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -2849,7 +2849,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tesla-charge-controller"
|
||||
version = "1.3.2"
|
||||
version = "1.3.3"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap 4.5.4",
|
||||
|
@ -2886,7 +2886,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "teslatte"
|
||||
version = "0.1.15"
|
||||
source = "git+https://git.alexjanka.com/alex/teslatte#ef26ce4697412b0fbfed64c01836eee613ffccf5"
|
||||
source = "git+https://git.alexjanka.com/alex/teslatte#490a50e24ca875e5eb26efc40c12229d5d2e1659"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap 4.5.4",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "tesla-charge-controller"
|
||||
version = "1.3.2"
|
||||
version = "1.3.3"
|
||||
edition = "2021"
|
||||
license = "MITNFA"
|
||||
description = "Controls Tesla charge rate based on solar charge data"
|
||||
|
|
|
@ -278,6 +278,13 @@ impl TeslaInterface {
|
|||
api.refresh().await?;
|
||||
let last_refresh = Instant::now();
|
||||
info!("Refreshed auth key");
|
||||
AuthInfo {
|
||||
access_token: api.access_token.clone(),
|
||||
refresh_token: api.refresh_token.clone(),
|
||||
}
|
||||
.save(Some(&auth_path))
|
||||
.map_err(tesla_common::SaveError::from)?;
|
||||
info!("Saved auth key");
|
||||
let vehicle = api
|
||||
.products()
|
||||
.await?
|
||||
|
|
Loading…
Reference in a new issue