Skip to content

Commit

Permalink
added outsideTemperature into AirConditioning class (#268)
Browse files Browse the repository at this point in the history
* added outsideTemp to AirConditioning class

* update fixtures

---------

Co-authored-by: Tomas Prvak <[email protected]>
  • Loading branch information
prvakt and Tomas Prvak authored Dec 4, 2024
1 parent 3794185 commit 313c461
Show file tree
Hide file tree
Showing 21 changed files with 33 additions and 3 deletions.
1 change: 1 addition & 0 deletions fixtures/Octavia2023_w_aux_heating.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/citigoe_iv_2021_ne142e2_best_of.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ reports:
front: 'OFF'
rear: 'OFF'
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/djapollo_enyaq_85_2025.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ reports:
front: 'OFF'
rear: 'OFF'
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/kamiq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/karoq-se-l_2023.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/kodiaq_2024_ps7d6z_exclusive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/nu74nv_karoq_expired_subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/nx53l5_octavia_2024_combi_deepsleep_0.8.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/octavia_2022.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/octavia_iv_2021_nx56xc_combi_rs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ reports:
unit_in_car: CELSIUS
window_heating_enabled: null
air_conditioning_without_external_power: true
outside_temperature: null
error: null
- type: get
vehicle_id: 0
Expand Down
1 change: 1 addition & 0 deletions fixtures/prior99_enyaq_iv60_idle_full_battery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ reports:
front: 'OFF'
rear: 'OFF'
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/prior99_octavia_2018.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/skoda_octavia_combi_2023.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ reports:
front: INVALID
rear: INVALID
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/sonar98_Enyaq_iV80_2022_software_3.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ reports:
front: 'OFF'
rear: 'OFF'
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
4 changes: 3 additions & 1 deletion fixtures/superb_2024_3v35wz_liftback_l_and_k.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ reports:
target_temperature: null
window_heating_enabled: null
air_conditioning_without_external_power: null
outside_temperature: null
error: null
- type: get
vehicle_id: 0
Expand Down Expand Up @@ -515,7 +516,8 @@ reports:
estimated_date_time_to_reach_target_temperature: null
outside_temperature:
temperature_value: 3.0
unit_in_car: CELSIUS
unit_in_car: CELSIUS
car_captured_timestamp: null
error: null
- type: get
vehicle_id: 0
Expand Down
1 change: 1 addition & 0 deletions fixtures/superb_iv_2020_3v35xc_liftback_l_and_k.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ reports:
front: 'OFF'
rear: 'OFF'
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/superb_iv_2021_3v54xc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ reports:
front: 'OFF'
rear: 'OFF'
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
1 change: 1 addition & 0 deletions fixtures/superb_iv_combi_2022_3V53XC_standing_still.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ reports:
front: 'OFF'
rear: 'OFF'
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ reports:
front: 'OFF'
rear: 'OFF'
unspecified: INVALID
outside_temperature: null
success: true
type: get
url: /v2/air-conditioning/TMOCKAA0AA000000
Expand Down
10 changes: 10 additions & 0 deletions myskoda/models/air_conditioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ class Config(BaseConfig):
code_generation_options = [TO_DICT_ADD_BY_ALIAS_FLAG] # noqa: RUF012


@dataclass
class OutsideTemperature(TargetTemperature):
car_captured_timestamp: datetime | None = field(
default=None, metadata=field_options(alias="carCapturedTimestamp")
)


@dataclass
class WindowHeatingState(DataClassORJSONMixin):
front: OnOffState
Expand Down Expand Up @@ -165,3 +172,6 @@ class AirConditioning(DataClassORJSONMixin):
air_conditioning_without_external_power: bool | None = field(
default=None, metadata=field_options(alias="airConditioningWithoutExternalPower")
)
outside_temperature: OutsideTemperature | None = field(
default=None, metadata=field_options(alias="outsideTemperature")
)
4 changes: 2 additions & 2 deletions myskoda/models/auxiliary_heating.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from mashumaro.config import TO_DICT_ADD_BY_ALIAS_FLAG, TO_DICT_ADD_OMIT_NONE_FLAG, BaseConfig
from mashumaro.mixins.orjson import DataClassORJSONMixin

from .air_conditioning import HeaterSource, TargetTemperature, Timer
from .air_conditioning import HeaterSource, OutsideTemperature, TargetTemperature, Timer


class AuxiliaryState(StrEnum):
Expand Down Expand Up @@ -83,6 +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(
outside_temperature: OutsideTemperature | None = field(
default=None, metadata=field_options(alias="outsideTemperature")
)

0 comments on commit 313c461

Please sign in to comment.