Skip to content

Commit

Permalink
fix: Print Debug Data - make WeatherData serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyKh committed Dec 31, 2024
1 parent 8f89333 commit 3585e43
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions custom_components/ims/weather_update_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
import homeassistant.util.dt as dt_util

from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from weatheril import WeatherIL
from weatheril import WeatherIL, Forecast, Weather, RadarSatellite

from .const import (
DOMAIN,
)
from dataclasses import dataclass

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -90,9 +91,8 @@ def _filter_future_forecast(weather_forecast):

weather_forecast.days = filtered_day_list


@dataclass
class WeatherData:
def __init__(self, current_weather, weather_forecast, images):
self.current_weather = current_weather
self.forecast = weather_forecast
self.images = images
current_weather: Weather
weather_forecast: Forecast
images: RadarSatellite

0 comments on commit 3585e43

Please sign in to comment.