pyastroweatherio 0.62.0.dev9__tar.gz → 0.62.0.dev10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/PKG-INFO +1 -1
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio/client.py +18 -1
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio/const.py +1 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio/dataclasses.py +13 -11
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio.egg-info/PKG-INFO +1 -1
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/setup.py +1 -1
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/LICENSE +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/README.md +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio/__init__.py +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio/errors.py +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio/helper_functions.py +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio.egg-info/SOURCES.txt +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio.egg-info/dependency_links.txt +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio.egg-info/requires.txt +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio.egg-info/top_level.txt +0 -0
- {pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/setup.cfg +0 -0
|
@@ -23,6 +23,7 @@ from pyastroweatherio.const import (
|
|
|
23
23
|
DEFAULT_CONDITION_CLOUDCOVER_LOW_WEAKENING,
|
|
24
24
|
DEFAULT_CONDITION_CLOUDCOVER_MEDIUM_WEAKENING,
|
|
25
25
|
DEFAULT_CONDITION_CLOUDCOVER_WEIGHT,
|
|
26
|
+
DEFAULT_CONDITION_FOG_WEIGHT,
|
|
26
27
|
DEFAULT_CONDITION_SEEING_WEIGHT,
|
|
27
28
|
DEFAULT_CONDITION_TRANSPARENCY_WEIGHT,
|
|
28
29
|
DEFAULT_ELEVATION,
|
|
@@ -86,6 +87,7 @@ class AstroWeather:
|
|
|
86
87
|
cloudcover_high_weakening=DEFAULT_CONDITION_CLOUDCOVER_HIGH_WEAKENING,
|
|
87
88
|
cloudcover_medium_weakening=DEFAULT_CONDITION_CLOUDCOVER_MEDIUM_WEAKENING,
|
|
88
89
|
cloudcover_low_weakening=DEFAULT_CONDITION_CLOUDCOVER_LOW_WEAKENING,
|
|
90
|
+
fog_weight=DEFAULT_CONDITION_FOG_WEIGHT,
|
|
89
91
|
seeing_weight=DEFAULT_CONDITION_SEEING_WEIGHT,
|
|
90
92
|
transparency_weight=DEFAULT_CONDITION_TRANSPARENCY_WEIGHT,
|
|
91
93
|
calm_weight=DEFAULT_CONDITION_CALM_WEIGHT,
|
|
@@ -115,6 +117,7 @@ class AstroWeather:
|
|
|
115
117
|
self._cloudcover_high_weakening = cloudcover_high_weakening
|
|
116
118
|
self._cloudcover_medium_weakening = cloudcover_medium_weakening
|
|
117
119
|
self._cloudcover_low_weakening = cloudcover_low_weakening
|
|
120
|
+
self._fog_weight = fog_weight
|
|
118
121
|
self._seeing_weight = seeing_weight
|
|
119
122
|
self._transparency_weight = transparency_weight
|
|
120
123
|
self._calm_weight = calm_weight
|
|
@@ -266,6 +269,7 @@ class AstroWeather:
|
|
|
266
269
|
details_metno.get("cloud_area_fraction_high"),
|
|
267
270
|
details_metno.get("cloud_area_fraction_medium"),
|
|
268
271
|
details_metno.get("cloud_area_fraction_low"),
|
|
272
|
+
details_metno.get("fog_area_fraction"),
|
|
269
273
|
seeing,
|
|
270
274
|
transparency,
|
|
271
275
|
details_metno.get("wind_speed"),
|
|
@@ -295,6 +299,7 @@ class AstroWeather:
|
|
|
295
299
|
cloudcover_high,
|
|
296
300
|
cloudcover_medium,
|
|
297
301
|
cloudcover_low,
|
|
302
|
+
fog,
|
|
298
303
|
seeing,
|
|
299
304
|
transparency,
|
|
300
305
|
wind_speed,
|
|
@@ -320,14 +325,25 @@ class AstroWeather:
|
|
|
320
325
|
100
|
|
321
326
|
- (
|
|
322
327
|
self._cloudcover_weight * max(cloudcover)
|
|
328
|
+
+ self._fog_weight * fog
|
|
323
329
|
+ self._seeing_weight * seeing
|
|
324
330
|
+ self._transparency_weight * transparency
|
|
325
331
|
+ self._calm_weight * wind_speed_value
|
|
326
332
|
)
|
|
327
|
-
/ (
|
|
333
|
+
/ (
|
|
334
|
+
self._cloudcover_weight
|
|
335
|
+
+ self._fog_weight
|
|
336
|
+
+ self._seeing_weight
|
|
337
|
+
+ self._transparency_weight
|
|
338
|
+
+ self._calm_weight
|
|
339
|
+
)
|
|
328
340
|
- precipitation_amount * 100
|
|
329
341
|
)
|
|
330
342
|
|
|
343
|
+
_LOGGER.debug(
|
|
344
|
+
f"Cloudcover: {max(cloudcover)}, Fog: {fog}, Seeing: {seeing}, Transparency: {transparency}, Wind speed: {wind_speed_value}"
|
|
345
|
+
)
|
|
346
|
+
|
|
331
347
|
# Ensure condition is within the valid range [0, 1]
|
|
332
348
|
condition = max(0, min(100, condition))
|
|
333
349
|
|
|
@@ -705,6 +721,7 @@ class AstroWeather:
|
|
|
705
721
|
details_forecast.cloud_area_fraction_high_percentage,
|
|
706
722
|
details_forecast.cloud_area_fraction_medium_percentage,
|
|
707
723
|
details_forecast.cloud_area_fraction_low_percentage,
|
|
724
|
+
details_forecast.fog_area_fraction_percentage,
|
|
708
725
|
details_forecast.seeing,
|
|
709
726
|
details_forecast.transparency,
|
|
710
727
|
details_forecast.wind10m_speed,
|
|
@@ -171,6 +171,7 @@ DEFAULT_CONDITION_CLOUDCOVER_WEIGHT = 3
|
|
|
171
171
|
DEFAULT_CONDITION_CLOUDCOVER_HIGH_WEAKENING = 1
|
|
172
172
|
DEFAULT_CONDITION_CLOUDCOVER_MEDIUM_WEAKENING = 1
|
|
173
173
|
DEFAULT_CONDITION_CLOUDCOVER_LOW_WEAKENING = 1
|
|
174
|
+
DEFAULT_CONDITION_FOG_WEIGHT = 3
|
|
174
175
|
DEFAULT_CONDITION_SEEING_WEIGHT = 2
|
|
175
176
|
DEFAULT_CONDITION_TRANSPARENCY_WEIGHT = 1
|
|
176
177
|
DEFAULT_CONDITION_CALM_WEIGHT = 2
|
{pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio/dataclasses.py
RENAMED
|
@@ -43,16 +43,6 @@ class TimeData:
|
|
|
43
43
|
self.seventimer_timepoint = data["seventimer_timepoint"]
|
|
44
44
|
self.forecast_time = data["forecast_time"]
|
|
45
45
|
|
|
46
|
-
# @property
|
|
47
|
-
# def seventimer_timepoint(self) -> datetime:
|
|
48
|
-
# """Return Forecast Anchor."""
|
|
49
|
-
|
|
50
|
-
# return self.seventimer_timepoint.replace(microsecond=0, tzinfo=timezone.utc)
|
|
51
|
-
|
|
52
|
-
# @seventimer_timepoint.setter
|
|
53
|
-
# def seventimer_timepoint(self, timepoint):
|
|
54
|
-
# self.seventimer_timepoint = timepoint
|
|
55
|
-
|
|
56
46
|
|
|
57
47
|
class GeoLocationDataModel(TypedDict):
|
|
58
48
|
"""Model for the location"""
|
|
@@ -292,6 +282,7 @@ class ConditionData:
|
|
|
292
282
|
|
|
293
283
|
@seeing.setter
|
|
294
284
|
def seeing(self, new_value: float):
|
|
285
|
+
"""Never called"""
|
|
295
286
|
self._seeing = new_value
|
|
296
287
|
|
|
297
288
|
@property
|
|
@@ -308,6 +299,7 @@ class ConditionData:
|
|
|
308
299
|
|
|
309
300
|
@transparency.setter
|
|
310
301
|
def transparency(self, new_value: float):
|
|
302
|
+
"""Never called"""
|
|
311
303
|
self._transparency = new_value
|
|
312
304
|
|
|
313
305
|
@property
|
|
@@ -324,6 +316,7 @@ class ConditionData:
|
|
|
324
316
|
|
|
325
317
|
@lifted_index.setter
|
|
326
318
|
def lifted_index(self, new_value: float):
|
|
319
|
+
"""Never called"""
|
|
327
320
|
self._lifted_index = new_value
|
|
328
321
|
|
|
329
322
|
@property
|
|
@@ -356,6 +349,7 @@ class ConditionData:
|
|
|
356
349
|
|
|
357
350
|
@dewpoint2m.setter
|
|
358
351
|
def dewpoint2m(self, new_value: float):
|
|
352
|
+
"""Never called"""
|
|
359
353
|
self._dewpoint2m = new_value
|
|
360
354
|
|
|
361
355
|
@property
|
|
@@ -366,6 +360,7 @@ class ConditionData:
|
|
|
366
360
|
|
|
367
361
|
@weather.setter
|
|
368
362
|
def weather(self, new_value: float):
|
|
363
|
+
"""Never called"""
|
|
369
364
|
self._weather = new_value
|
|
370
365
|
|
|
371
366
|
@property
|
|
@@ -376,6 +371,7 @@ class ConditionData:
|
|
|
376
371
|
|
|
377
372
|
@weather6.setter
|
|
378
373
|
def weather6(self, new_value: float):
|
|
374
|
+
"""Never called"""
|
|
379
375
|
self._weather6 = new_value
|
|
380
376
|
|
|
381
377
|
|
|
@@ -795,6 +791,12 @@ class LocationData:
|
|
|
795
791
|
|
|
796
792
|
return round(self.moon_data.relative_size * 100 - 100, 3)
|
|
797
793
|
|
|
794
|
+
@property
|
|
795
|
+
def moon_relative_distance(self) -> float:
|
|
796
|
+
"""Return Moon Relative Distance in %."""
|
|
797
|
+
|
|
798
|
+
return round(self.moon_data.relative_distance * 100 - 100, 3)
|
|
799
|
+
|
|
798
800
|
# #########################################################################
|
|
799
801
|
# Darkness
|
|
800
802
|
# #########################################################################
|
|
@@ -1127,9 +1129,9 @@ class NightlyConditionsData:
|
|
|
1127
1129
|
@property
|
|
1128
1130
|
def weather(self) -> str:
|
|
1129
1131
|
"""Return Current Weather."""
|
|
1130
|
-
|
|
1131
1132
|
return self._weather.replace("_", " ").capitalize()
|
|
1132
1133
|
|
|
1133
1134
|
@weather.setter
|
|
1134
1135
|
def weather(self, new_value: str):
|
|
1136
|
+
"""Never called"""
|
|
1135
1137
|
self._weather = new_value
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio/helper_functions.py
RENAMED
|
File without changes
|
{pyastroweatherio-0.62.0.dev9 → pyastroweatherio-0.62.0.dev10}/pyastroweatherio.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|