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,