-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
fixed remarks + implemented temperature rounding to 0,5 step
Tomas Prvak
committed
Nov 8, 2024
1 parent
fd69d07
commit 144a50a
Showing
8 changed files
with
61 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
"""Models for responses of api/v2/garage/vehicles/{vin}.""" | ||
"""Models for responses of api/v1/spin/verify.""" | ||
|
||
import logging | ||
from dataclasses import dataclass, field | ||
from enum import StrEnum | ||
|
||
from mashumaro import field_options | ||
from mashumaro.mixins.orjson import DataClassORJSONMixin | ||
|
||
_LOGGER = logging.getLogger(__name__) | ||
|
||
class VerificationStatus(StrEnum): | ||
"""List of known statuses for SPIN.""" | ||
|
||
CORRECT_SPIN = "CORRECT_SPIN" | ||
INCORRECT_SPIN = "INCORRECT_SPIN" | ||
|
||
@dataclass | ||
class SpinStatus(DataClassORJSONMixin): | ||
state: str | ||
remainingTries: int | ||
lockedWaitingTimeInSeconds: int | ||
remaining_tries: int = field(metadata=field_options(alias="remainingTries")) | ||
locked_waiting_time_in_seconds: int = field( | ||
metadata=field_options(alias="lockedWaitingTimeInSeconds")) | ||
|
||
@dataclass | ||
class Spin(DataClassORJSONMixin): | ||
verificationStatus: VerificationStatus | ||
spinStatus: SpinStatus | None = field(default=None) | ||
verification_status: VerificationStatus = field( | ||
metadata=field_options(alias="verificationStatus")) | ||
spin_status: SpinStatus | None = field(default=None, | ||
metadata=field_options(alias="spinStatus")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters