charging state as enum
This commit is contained in:
parent
a2bc59fb34
commit
64aa35a969
|
@ -217,7 +217,7 @@ pub struct ChargeState {
|
||||||
pub charger_pilot_current: Option<i64>,
|
pub charger_pilot_current: Option<i64>,
|
||||||
pub charger_power: Option<i64>,
|
pub charger_power: Option<i64>,
|
||||||
pub charger_voltage: Option<i64>,
|
pub charger_voltage: Option<i64>,
|
||||||
pub charging_state: String,
|
pub charging_state: ChargingState,
|
||||||
pub conn_charge_cable: String,
|
pub conn_charge_cable: String,
|
||||||
pub est_battery_range: f64,
|
pub est_battery_range: f64,
|
||||||
pub fast_charger_brand: String,
|
pub fast_charger_brand: String,
|
||||||
|
@ -250,6 +250,15 @@ pub struct ChargeState {
|
||||||
pub user_charge_enable_request: Option<bool>,
|
pub user_charge_enable_request: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, Display, Deserialize, Serialize, PartialEq)]
|
||||||
|
pub enum ChargingState {
|
||||||
|
Charging,
|
||||||
|
Stopped,
|
||||||
|
Disconnected,
|
||||||
|
#[serde(other)]
|
||||||
|
Other,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct ClimateState {
|
pub struct ClimateState {
|
||||||
pub allow_cabin_overheat_protection: bool,
|
pub allow_cabin_overheat_protection: bool,
|
||||||
|
|
Loading…
Reference in a new issue