Skip to content

Commit

Permalink
add climatization settings and vehicle status
Browse files Browse the repository at this point in the history
  • Loading branch information
tillsteinbach committed Jan 17, 2025
1 parent 55a4309 commit 13201f4
Show file tree
Hide file tree
Showing 5 changed files with 271 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/carconnectivity_connectors/skoda/charging.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class SkodaChargeMode(Enum,):
ONLY_OWN_CURRENT = 'ONLY_OWN_CURRENT'
PREFERRED_CHARGING_TIMES = 'PREFERRED_CHARGING_TIMES'
TIMER_CHARGING_WITH_CLIMATISATION = 'TIMER_CHARGING_WITH_CLIMATISATION'
TIMER = 'TIMER'
MANUAL = 'MANUAL'
OFF = 'OFF'
TIMER = 'timer'
MANUAL = 'manual'
OFF = 'off'
UNKNOWN = 'unknown charge mode'

class SkodaChargingCareMode(Enum,):
Expand Down
41 changes: 41 additions & 0 deletions src/carconnectivity_connectors/skoda/climatization.py
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)
Loading

0 comments on commit 13201f4

Please sign in to comment.