Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture Cabin Overheat protection status #3317

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/tesla_api/vehicle/state.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: claimte["cabin_overheat_protection_actively_cooling"],
cwanja marked this conversation as resolved.
Show resolved Hide resolved
defrost_mode: climate["defrost_mode"],
driver_temp_setting: climate["driver_temp_setting"],
fan_status: climate["fan_status"],
Expand Down
5 changes: 4 additions & 1 deletion lib/teslamate/log/position.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion lib/teslamate/vehicles/vehicle.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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
cwanja marked this conversation as resolved.
Show resolved Hide resolved
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,
Expand Down