From 4f29b3fcf85d08e2a6eafc8ca56085780bd8ec64 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Mon, 15 Jan 2024 15:55:38 +1100 Subject: [PATCH] inverted logic for charger connected lmao --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/types.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fabed74..c795dc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2256,7 +2256,7 @@ dependencies = [ [[package]] name = "tesla-charge-controller" -version = "0.2.7" +version = "0.2.8" dependencies = [ "async-channel", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 8378c62..128b31f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tesla-charge-controller" -version = "0.2.7" +version = "0.2.8" edition = "2021" license = "MITNFA" description = "Controls Tesla charge rate based on solar charge data" diff --git a/src/types.rs b/src/types.rs index 43d6d07..9033af1 100644 --- a/src/types.rs +++ b/src/types.rs @@ -57,7 +57,7 @@ impl ChargeState { impl From for ChargeState { fn from(value: teslatte::vehicles::ChargeState) -> Self { - let charger_connected = value.conn_charge_cable == ""; + let charger_connected = value.conn_charge_cable != ""; ChargeState { battery_level: value.battery_level, battery_range: value.battery_range,