refactor(rp5): rework rp5 parser
This commit is contained in:
@@ -51,10 +51,10 @@ Precipitation.values = list(Precipitation)
|
||||
|
||||
|
||||
class Sky(Model):
|
||||
cloudness: Cloudness
|
||||
precipitation: Precipitation
|
||||
thunder: bool
|
||||
fog: bool
|
||||
cloudness: Cloudness = Cloudness.CLEAR
|
||||
precipitation: Precipitation = Precipitation.NO
|
||||
thunder: bool = False
|
||||
fog: bool = False
|
||||
|
||||
|
||||
class WindDirection(StrEnum):
|
||||
@@ -69,8 +69,8 @@ class WindDirection(StrEnum):
|
||||
|
||||
|
||||
class Wind(Model):
|
||||
speed: int
|
||||
gust: int
|
||||
speed: int = 0
|
||||
gust: int = 0
|
||||
direction: WindDirection | None = None
|
||||
|
||||
|
||||
@@ -79,9 +79,9 @@ class WeatherValue(Model):
|
||||
sky: Sky
|
||||
wind: Wind
|
||||
temperature: list[int]
|
||||
precipitation: float
|
||||
precipitation: float = 0
|
||||
pressure: list[int] = Field(default=[])
|
||||
humidity: int = Field(default=-1)
|
||||
humidity: int = -1
|
||||
|
||||
|
||||
class WeatherResponse(Model):
|
||||
|
||||
Reference in New Issue
Block a user