Add descriptions for solar conditions #92

This commit is contained in:
Ian Renton
2026-03-28 10:39:26 +00:00
parent 1173af6a9d
commit 2a5e0db5bc
14 changed files with 203 additions and 49 deletions

View File

@@ -30,3 +30,12 @@ class SolarConditionsProvider:
"""Stop any threads and prepare for application shutdown"""
raise NotImplementedError("Subclasses must implement this method")
def update_data(self, new_data):
"""Update the solar conditions object with new data"""
if new_data:
for key, value in new_data.items():
if hasattr(self._solar_conditions, key):
setattr(self._solar_conditions, key, value)
self._solar_conditions.infer_descriptions()