Fix security issues, breaking changes, and code cleanup for weather satellite PR

Co-authored-by: mitchross <6330506+mitchross@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-09 20:58:26 +00:00
parent 35cf01c11e
commit d41ba61aee
8 changed files with 54 additions and 31 deletions

View File

@@ -185,6 +185,11 @@ class WeatherSatDecoder:
def current_frequency(self) -> float:
return self._current_frequency
@property
def device_index(self) -> int:
"""Return current device index."""
return self._device_index
def _detect_decoder(self) -> str | None:
"""Detect which weather satellite decoder is available."""
if shutil.which('satdump'):

View File

@@ -51,14 +51,16 @@ class ScheduledPass:
def start_dt(self) -> datetime:
dt = datetime.fromisoformat(self.start_time)
if dt.tzinfo is None:
return dt.replace(tzinfo=timezone.utc)
# Naive datetime - assume UTC
dt = dt.replace(tzinfo=timezone.utc)
return dt.astimezone(timezone.utc)
@property
def end_dt(self) -> datetime:
dt = datetime.fromisoformat(self.end_time)
if dt.tzinfo is None:
return dt.replace(tzinfo=timezone.utc)
# Naive datetime - assume UTC
dt = dt.replace(tzinfo=timezone.utc)
return dt.astimezone(timezone.utc)
def to_dict(self) -> dict[str, Any]: