-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add climatization settings and vehicle status
- Loading branch information
1 parent
55a4309
commit 13201f4
Showing
5 changed files
with
271 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
""" | ||
Module for charging for skoda vehicles. | ||
""" | ||
from __future__ import annotations | ||
from typing import TYPE_CHECKING | ||
|
||
from carconnectivity.climatization import Climatization | ||
from carconnectivity.objects import GenericObject | ||
from carconnectivity.vehicle import ElectricVehicle | ||
|
||
from carconnectivity_connectors.skoda.error import Error | ||
|
||
if TYPE_CHECKING: | ||
from typing import Optional, Dict | ||
|
||
|
||
class SkodaClimatization(Climatization): # pylint: disable=too-many-instance-attributes | ||
""" | ||
SkodaClimatization class for handling Skoda vehicle climatization information. | ||
This class extends the Climatization class and includes an enumeration of various | ||
charging states specific to Skoda vehicles. | ||
""" | ||
def __init__(self, vehicle: ElectricVehicle | None = None, origin: Optional[Climatization] = None) -> None: | ||
if origin is not None: | ||
super().__init__(origin=origin) | ||
self.settings: Climatization.Settings = SkodaClimatization.Settings(origin=origin.settings) | ||
else: | ||
super().__init__(vehicle=vehicle) | ||
self.settings: Climatization.Settings = SkodaClimatization.Settings(origin=self.settings) | ||
self.errors: Dict[str, Error] = {} | ||
|
||
class Settings(Climatization.Settings): | ||
""" | ||
This class represents the settings for a skoda car climatiation. | ||
""" | ||
def __init__(self, parent: Optional[GenericObject] = None, origin: Optional[Climatization.Settings] = None) -> None: | ||
if origin is not None: | ||
super().__init__(origin=origin) | ||
else: | ||
super().__init__(parent=parent) |
Oops, something went wrong.