diff --git a/lib/tesla_api/vehicle/state.ex b/lib/tesla_api/vehicle/state.ex index 6220e9ddd7..03a2cd9388 100644 --- a/lib/tesla_api/vehicle/state.ex +++ b/lib/tesla_api/vehicle/state.ex @@ -98,6 +98,8 @@ defmodule TeslaApi.Vehicle.State do :battery_heater, :battery_heater_no_power, :climate_keeper_mode, + :cabin_overheat_protection, + :cabin_overheat_protection_actively_cooling, :defrost_mode, :driver_temp_setting, :fan_status, @@ -133,6 +135,8 @@ defmodule TeslaApi.Vehicle.State do battery_heater: climate["battery_heater"], battery_heater_no_power: climate["battery_heater_no_power"], climate_keeper_mode: climate["climate_keeper_mode"], + cabin_overheat_protection: climate["cabin_overheat_protection"], + cabin_overheat_protection_actively_cooling: climate["cabin_overheat_protection_actively_cooling"], defrost_mode: climate["defrost_mode"], driver_temp_setting: climate["driver_temp_setting"], fan_status: climate["fan_status"], diff --git a/lib/teslamate/log/position.ex b/lib/teslamate/log/position.ex index 9f7f9af459..4a3d05f6a9 100644 --- a/lib/teslamate/log/position.ex +++ b/lib/teslamate/log/position.ex @@ -9,7 +9,6 @@ defmodule TeslaMate.Log.Position do field :latitude, :decimal, read_after_writes: true field :longitude, :decimal, read_after_writes: true field :elevation, :integer - field :speed, :integer field :power, :integer field :odometer, :float @@ -29,6 +28,8 @@ defmodule TeslaMate.Log.Position do field :is_climate_on, :boolean field :is_rear_defroster_on, :boolean field :is_front_defroster_on, :boolean + field :cabin_overheat_protection, :boolean + field :cabin_overheat_protection_actively_cooling, :boolean field :tpms_pressure_fl, :decimal field :tpms_pressure_fr, :decimal field :tpms_pressure_rl, :decimal @@ -66,6 +67,8 @@ defmodule TeslaMate.Log.Position do :is_climate_on, :is_rear_defroster_on, :is_front_defroster_on, + :cabin_overheat_protection, + :cabin_overheat_protection_actively_cooling, :tpms_pressure_fl, :tpms_pressure_fr, :tpms_pressure_rl, diff --git a/lib/teslamate/vehicles/vehicle.ex b/lib/teslamate/vehicles/vehicle.ex index 147be4d8de..3601f9fc6c 100644 --- a/lib/teslamate/vehicles/vehicle.ex +++ b/lib/teslamate/vehicles/vehicle.ex @@ -1160,7 +1160,9 @@ defmodule TeslaMate.Vehicles.Vehicle do climate = %Climate{ outside_temp: position.outside_temp, - inside_temp: position.inside_temp + inside_temp: position.inside_temp, + cabin_overheat_protection: position.cabin_overheat_protection, + cabin_overheat_protection_actively_cooling: position.cabin_overheat_protection_actively_cooling } vehicle_state = %VehicleState{ @@ -1261,6 +1263,8 @@ defmodule TeslaMate.Vehicles.Vehicle do passenger_temp_setting: vehicle.climate_state.passenger_temp_setting, is_rear_defroster_on: vehicle.climate_state.is_rear_defroster_on, is_front_defroster_on: vehicle.climate_state.is_front_defroster_on, + cabin_overheat_protection: vehicle.climate_state.cabin_overheat_protection, + cabin_overheat_protection_actively_cooling: vehicle.climate_state.cabin_overheat_protection_actively_cooling, battery_heater_on: vehicle.charge_state.battery_heater_on, battery_heater: vehicle.climate_state.battery_heater, battery_heater_no_power: vehicle.climate_state.battery_heater_no_power, diff --git a/lib/teslamate/vehicles/vehicle/summary.ex b/lib/teslamate/vehicles/vehicle/summary.ex index ccf85e574b..e65dcc7fae 100644 --- a/lib/teslamate/vehicles/vehicle/summary.ex +++ b/lib/teslamate/vehicles/vehicle/summary.ex @@ -106,6 +106,8 @@ defmodule TeslaMate.Vehicles.Vehicle.Summary do is_preconditioning: get_in_struct(vehicle, [:climate_state, :is_preconditioning]), outside_temp: get_in_struct(vehicle, [:climate_state, :outside_temp]), inside_temp: get_in_struct(vehicle, [:climate_state, :inside_temp]), + cabin_overheat_protection: get_in_struct(vehicle, [:climate_state, :cabin_overheat_protection]), + cabin_overheat_protection_actively_cooling: get_in_struct(vehicle, [:climate_state, :cabin_overheat_protection_actively_cooling]), # Vehicle State odometer: get_in_struct(vehicle, [:vehicle_state, :odometer]) |> miles_to_km(2),