Skip to content

Commit

Permalink
Fix Auxiliary Heater for ICE, add outside_temperature (#260)
Browse files Browse the repository at this point in the history
* added AUXILIARY_HEATING_BASIC capability
* added targetTemperature to AuxiliaryHeating class
* added auxiliary_heating object to vehicle
* added request for auxiliary_heating into get_vehicle()
* fixtures updated

---------

Co-authored-by: Tomas Prvak <[email protected]>
  • Loading branch information
prvakt and Tomas Prvak authored Dec 3, 2024
1 parent 71cf54b commit f81c032
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fixtures/superb_2024_3v35wz_liftback_l_and_k.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ reports:
engine:
power: 206
type: TSI
capacity_in_liters: 2
capacity_in_liters: 2.0
model: Superb
title: Škoda Superb
manufacturing_date: '2023-08-23'
Expand Down Expand Up @@ -249,6 +249,8 @@ reports:
statuses: []
- id: CARE_AND_INSURANCE
statuses: []
- id: AUXILIARY_HEATING_BASIC
statuses: []
renders:
- url: >-
https://iprenders.blob.core.windows.net/base3v3v23200002/0F0FWBQ-6-RemtP8.jqZy0-ZqEczfhG_n50.tUwX-CWwFuhHKJkNPz40df893ms-Has5qeWchF.UzAl13y8jCtnK-CKFEIA-19201080dayvext_front1080.png
Expand Down Expand Up @@ -507,6 +509,9 @@ reports:
target_temperature: null
car_captured_timestamp: '2024-11-27T07:06:35+00:00'
estimated_date_time_to_reach_target_temperature: null
outside_temperature:
temperature_value: 3.0
unit_in_car: CELSIUS
error: null
- type: get
vehicle_id: 0
Expand Down
3 changes: 3 additions & 0 deletions myskoda/models/auxiliary_heating.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ class AuxiliaryHeating(DataClassORJSONMixin):
estimated_date_time_to_reach_target_temperature: datetime | None = field(
default=None, metadata=field_options(alias="estimatedDateTimeToReachTargetTemperature")
)
outside_temperature: TargetTemperature | None = field(
default=None, metadata=field_options(alias="outsideTemperature")
)
1 change: 1 addition & 0 deletions myskoda/models/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CapabilityId(StrEnum):
AIR_CONDITIONING_TIMERS = "AIR_CONDITIONING_TIMERS"
AUTOMATION = "AUTOMATION"
AUXILIARY_HEATING = "AUXILIARY_HEATING"
AUXILIARY_HEATING_BASIC = "AUXILIARY_HEATING_BASIC"
AUXILIARY_HEATING_TEMPERATURE_SETTING = "AUXILIARY_HEATING_TEMPERATURE_SETTING"
AUXILIARY_HEATING_TIMERS = "AUXILIARY_HEATING_TIMERS"
BATTERY_CHARGING_CARE = "BATTERY_CHARGING_CARE"
Expand Down
3 changes: 3 additions & 0 deletions myskoda/myskoda.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ async def get_vehicle(self, vin: str) -> Vehicle:
if info.is_capability_available(CapabilityId.AIR_CONDITIONING):
vehicle.air_conditioning = await self.get_air_conditioning(vin)

if info.is_capability_available(CapabilityId.AUXILIARY_HEATING):
vehicle.auxiliary_heating = await self.get_auxiliary_heating(vin)

if info.is_capability_available(CapabilityId.PARKING_POSITION):
vehicle.positions = await self.get_positions(vin)

Expand Down
2 changes: 2 additions & 0 deletions myskoda/vehicle.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Represents a whole vehicle."""

from .models.air_conditioning import AirConditioning
from .models.auxiliary_heating import AuxiliaryHeating
from .models.charging import Charging
from .models.driving_range import DrivingRange
from .models.health import Health
Expand All @@ -18,6 +19,7 @@ class Vehicle:
charging: Charging | None = None
status: Status | None = None
air_conditioning: AirConditioning | None = None
auxiliary_heating: AuxiliaryHeating | None = None
positions: Positions | None = None
driving_range: DrivingRange | None = None
trip_statistics: TripStatistics | None = None
Expand Down

0 comments on commit f81c032

Please sign in to comment.