Skip to content

Commit

Permalink
Add form of listed defects (skodaconnect#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
WebSpider authored Nov 20, 2024
1 parent dd47e23 commit 0172307
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions myskoda/models/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from dataclasses import dataclass, field
from datetime import datetime
from enum import StrEnum
from typing import Any

from mashumaro import field_options
from mashumaro.mixins.orjson import DataClassORJSONMixin
Expand All @@ -20,10 +19,17 @@ class WarningLightCategory(StrEnum):
OTHER = "OTHER"


@dataclass
class DefectDetails(DataClassORJSONMixin):
text: str
priority: str
icon: str | None = None


@dataclass
class WarningLight(DataClassORJSONMixin):
category: WarningLightCategory
defects: list[Any]
defects: list[DefectDetails]


@dataclass
Expand Down

0 comments on commit 0172307

Please sign in to comment.