diff --git a/src/vehicles.rs b/src/vehicles.rs index e41d40a..7dc430f 100644 --- a/src/vehicles.rs +++ b/src/vehicles.rs @@ -266,13 +266,13 @@ pub struct ClimateState { pub auto_seat_climate_right: Option, pub battery_heater: bool, pub battery_heater_no_power: Option, - pub cabin_overheat_protection: String, + pub cabin_overheat_protection: CabinOverheatProtection, pub cabin_overheat_protection_actively_cooling: Option, pub climate_keeper_mode: String, pub defrost_mode: i64, pub driver_temp_setting: f64, pub fan_status: i64, - pub hvac_auto_request: String, + pub hvac_auto_request: HvacAutoRequest, pub inside_temp: Option, pub is_auto_conditioning_on: Option, pub is_climate_on: bool, @@ -302,6 +302,23 @@ pub struct ClimateState { pub steering_wheel_heat_level: Option, } +#[derive(Debug, Clone, Copy, Display, Deserialize, Serialize, PartialEq)] +pub enum CabinOverheatProtection { + Off, + On, + FanOnly, + #[serde(other)] + Unknown, +} + +#[derive(Debug, Clone, Copy, Display, Deserialize, Serialize, PartialEq)] +pub enum HvacAutoRequest { + Override, + On, + #[serde(other)] + Unknown, +} + #[derive(Debug, Clone, Serialize, Deserialize)] pub struct DriveState { /// From https://developer.tesla.com/docs/fleet-api#vehicle_data