inverted logic for charger connected lmao

This commit is contained in:
Alex Janka 2024-01-15 15:55:38 +11:00
parent 0b5ca36bae
commit 4f29b3fcf8
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View file

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

View file

@ -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"

View file

@ -57,7 +57,7 @@ impl ChargeState {
impl From<teslatte::vehicles::ChargeState> for ChargeState {
fn from(value: teslatte::vehicles::ChargeState) -> Self {
let charger_connected = value.conn_charge_cable == "<invalid>";
let charger_connected = value.conn_charge_cable != "<invalid>";
ChargeState {
battery_level: value.battery_level,
battery_range: value.battery_range,