Skip to content

Commit

Permalink
Update station.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Noltari authored Aug 23, 2023
1 parent 493baa5 commit 2e49cf2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aemet_opendata/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,22 @@
AOD_TEMP_MIN,
AOD_TIMESTAMP,
ATTR_DATA,
ATTR_DISTANCE,
)
from .helpers import get_current_datetime, parse_api_timestamp


class Station:
"""AEMET OpenData Station."""

def __init__(self, distance: float, data: dict[str, Any]) -> None:
def __init__(self, data: dict[str, Any]) -> None:
"""Init AEMET OpenData Station."""
self.altitude = float(data[AEMET_ATTR_STATION_ALTITUDE])
self.coords = (
float(data[AEMET_ATTR_STATION_LATITUDE]),
float(data[AEMET_ATTR_STATION_LONGITUDE]),
)
self.distance = distance
self.distance = float(data[ATTR_DISTANCE])
self.humidity: float
self.id = str(data[AEMET_ATTR_IDEMA])
self.name = str(data[AEMET_ATTR_STATION_LOCATION])
Expand Down

0 comments on commit 2e49cf2

Please sign in to comment.