pyastroweatherio 0.62.0.dev1__tar.gz → 0.62.0.dev3__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.dev1 → pyastroweatherio-0.62.0.dev3}/PKG-INFO +1 -1
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio/client.py +7 -2
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio/const.py +44 -10
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio/dataclasses.py +3 -3
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio/helper_functions.py +64 -284
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio.egg-info/PKG-INFO +1 -1
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/setup.py +1 -1
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/LICENSE +0 -0
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/README.md +0 -0
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio/__init__.py +0 -0
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio/errors.py +0 -0
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio.egg-info/SOURCES.txt +0 -0
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio.egg-info/dependency_links.txt +0 -0
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio.egg-info/requires.txt +0 -0
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio.egg-info/top_level.txt +0 -0
- {pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/setup.cfg +0 -0
|
@@ -31,6 +31,7 @@ from pyastroweatherio.const import (
|
|
|
31
31
|
DEFAULT_TIMEZONE,
|
|
32
32
|
FORECAST_TYPE_HOURLY,
|
|
33
33
|
HEADERS,
|
|
34
|
+
LIFTED_INDEX_7TIMER_MAPPING,
|
|
34
35
|
MAG_DEGRATION_MAX,
|
|
35
36
|
SEEING,
|
|
36
37
|
SEEING_MAX,
|
|
@@ -284,7 +285,9 @@ class AstroWeather:
|
|
|
284
285
|
),
|
|
285
286
|
)
|
|
286
287
|
else:
|
|
287
|
-
lifted_index =
|
|
288
|
+
lifted_index = LIFTED_INDEX_7TIMER_MAPPING[
|
|
289
|
+
details_seventimer["lifted_index"]
|
|
290
|
+
]
|
|
288
291
|
|
|
289
292
|
item = {
|
|
290
293
|
# seventimer_init is "init" of 7timer astro data
|
|
@@ -500,7 +503,9 @@ class AstroWeather:
|
|
|
500
503
|
),
|
|
501
504
|
)
|
|
502
505
|
else:
|
|
503
|
-
lifted_index =
|
|
506
|
+
lifted_index = LIFTED_INDEX_7TIMER_MAPPING[
|
|
507
|
+
details_seventimer["lifted_index"]
|
|
508
|
+
]
|
|
504
509
|
|
|
505
510
|
item["cloudcover"] = details_metno.get("cloud_area_fraction")
|
|
506
511
|
item["cloud_area_fraction"] = details_metno.get("cloud_area_fraction")
|
|
@@ -88,18 +88,43 @@ MAG_DEGRATION_MAX = 1
|
|
|
88
88
|
# LI ≈ +4 to +6: Moderately stable atmosphere, very limited potential for thunderstorms, very weak vertical motion.
|
|
89
89
|
# LI > +6: Strongly stable atmosphere, very limited potential for thunderstorms, very weak to no vertical motion.
|
|
90
90
|
LIFTED_INDEX_VALUE = [1, 2, 3, 4, 5, 6, 7, 8]
|
|
91
|
-
LIFTED_INDEX_RANGE = [
|
|
91
|
+
# LIFTED_INDEX_RANGE = [
|
|
92
|
+
# (-20, -6.99),
|
|
93
|
+
# (-7, -4.99),
|
|
94
|
+
# (-5, -2.99),
|
|
95
|
+
# (-3, -0.01),
|
|
96
|
+
# (0, 3.99),
|
|
97
|
+
# (4, 7.99),
|
|
98
|
+
# (8, 10.99),
|
|
99
|
+
# (11, 20),
|
|
100
|
+
# ]
|
|
101
|
+
LIFTED_INDEX_RANGE = [
|
|
102
|
+
(-7, -6.01),
|
|
103
|
+
(-6, -4.01),
|
|
104
|
+
(-4, -1.51),
|
|
105
|
+
(-1.5, -0.01),
|
|
106
|
+
(0, 1.49),
|
|
107
|
+
(1.5, 3.99),
|
|
108
|
+
(4, 5.99),
|
|
109
|
+
(6, 7),
|
|
110
|
+
]
|
|
92
111
|
LIFTED_INDEX_PLAIN = [
|
|
93
|
-
"Below -
|
|
94
|
-
"-
|
|
95
|
-
"-
|
|
96
|
-
"-
|
|
97
|
-
"0 to
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"Over
|
|
112
|
+
"Below -6, very unstable",
|
|
113
|
+
"-6 to -4, very unstable",
|
|
114
|
+
"-4 to -1.5, unstable",
|
|
115
|
+
"-1.5 to 0, slightly unstable",
|
|
116
|
+
"0 to 1.5, stable",
|
|
117
|
+
"1.5 to 4, stable",
|
|
118
|
+
"4 to 6, very stable",
|
|
119
|
+
"Over 6, very stable",
|
|
101
120
|
]
|
|
102
121
|
|
|
122
|
+
LIFTED_INDEX_7TIMER_KEYS = [-10, -6, -4, -1, 2, 6, 10, 15]
|
|
123
|
+
LIFTED_INDEX_7TIMER_VALUES = [-7, -6, -4, -1.5, 0, 1.5, 4, 7]
|
|
124
|
+
LIFTED_INDEX_7TIMER_MAPPING = dict(
|
|
125
|
+
zip(LIFTED_INDEX_7TIMER_KEYS, LIFTED_INDEX_7TIMER_VALUES)
|
|
126
|
+
)
|
|
127
|
+
|
|
103
128
|
# #####################################################
|
|
104
129
|
# Wind
|
|
105
130
|
# #####################################################
|
|
@@ -119,7 +144,16 @@ LIFTED_INDEX_PLAIN = [
|
|
|
119
144
|
# 12 -- Hurricane over 73 mph over 32 m/s Violent destruction
|
|
120
145
|
WIND10M_DIRECTON = ["N", "NE", "E", "SE", "S", "SW", "W", "NW"]
|
|
121
146
|
WIND10M_VALUE = [1, 2, 3, 4, 5, 6, 7, 8]
|
|
122
|
-
WIND10M_RANGE = [
|
|
147
|
+
WIND10M_RANGE = [
|
|
148
|
+
(0, 0.49),
|
|
149
|
+
(0.5, 1.99),
|
|
150
|
+
(2, 3.49),
|
|
151
|
+
(3.5, 5.49),
|
|
152
|
+
(5.5, 8.49),
|
|
153
|
+
(8.5, 10.99),
|
|
154
|
+
(11, 13.99),
|
|
155
|
+
(14, 100),
|
|
156
|
+
]
|
|
123
157
|
WIND10M_PLAIN = [
|
|
124
158
|
"Calm",
|
|
125
159
|
"Light air",
|
{pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio/dataclasses.py
RENAMED
|
@@ -290,9 +290,9 @@ class LocationData(BaseData):
|
|
|
290
290
|
self._uptonight_bodies = data["uptonight_bodies"]
|
|
291
291
|
self._uptonight_comets = data["uptonight_comets"]
|
|
292
292
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
293
|
+
pp(self._sun_data)
|
|
294
|
+
pp(self._moon_data)
|
|
295
|
+
pp(self._darkness_data)
|
|
296
296
|
|
|
297
297
|
@property
|
|
298
298
|
def time_shift(self) -> int:
|
{pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio/helper_functions.py
RENAMED
|
@@ -604,28 +604,6 @@ class AstronomicalRoutines:
|
|
|
604
604
|
self._calculate_sun()
|
|
605
605
|
self._calculate_moon()
|
|
606
606
|
|
|
607
|
-
# if (
|
|
608
|
-
# self._sun_next_setting_civil is None
|
|
609
|
-
# or self._sun_next_setting_nautical is None
|
|
610
|
-
# or self._sun_next_setting_astro is None
|
|
611
|
-
# or self._sun_next_rising_astro is None
|
|
612
|
-
# or self._sun_next_rising_nautical is None
|
|
613
|
-
# or self._sun_next_rising_civil is None
|
|
614
|
-
# or self._moon_data.get("next_rising", None) is None
|
|
615
|
-
# or self._moon_data.get("next_rsetting", None) is None
|
|
616
|
-
# or self._forecast_time > self._sun_next_setting_civil
|
|
617
|
-
# or self._forecast_time > self._sun_next_setting_nautical
|
|
618
|
-
# or self._forecast_time > self._sun_next_setting_astro
|
|
619
|
-
# or self._forecast_time > self._sun_next_rising_astro
|
|
620
|
-
# or self._forecast_time > self._sun_next_rising_nautical
|
|
621
|
-
# or self._forecast_time > self._sun_next_rising_civil
|
|
622
|
-
# or self._forecast_time > self._moon_data["next_rising"]
|
|
623
|
-
# or self._forecast_time > self._moon_data["next_setting"]
|
|
624
|
-
# ):
|
|
625
|
-
# _LOGGER.debug("Astronomical calculations updating")
|
|
626
|
-
# self._calculate_sun()
|
|
627
|
-
# self._calculate_moon()
|
|
628
|
-
|
|
629
607
|
#
|
|
630
608
|
# Observers
|
|
631
609
|
#
|
|
@@ -659,6 +637,56 @@ class AstronomicalRoutines:
|
|
|
659
637
|
# #########################################################################
|
|
660
638
|
# Sun
|
|
661
639
|
# #########################################################################
|
|
640
|
+
async def sun_data(self) -> dict:
|
|
641
|
+
"""Returns moon data."""
|
|
642
|
+
|
|
643
|
+
if self._sun_data is not None:
|
|
644
|
+
return self._sun_data
|
|
645
|
+
|
|
646
|
+
async def sun_next_rising(self) -> datetime:
|
|
647
|
+
"""Returns sun next rising."""
|
|
648
|
+
|
|
649
|
+
if (
|
|
650
|
+
not self._test_data(
|
|
651
|
+
self._sun_data,
|
|
652
|
+
["next_rising_astro", "next_rising_nautical", "next_rising_civil"],
|
|
653
|
+
)
|
|
654
|
+
or self._forecast_time > self._sun_data["next_rising_astro"]
|
|
655
|
+
or self._forecast_time > self._sun_data["next_rising_nautical"]
|
|
656
|
+
or self._forecast_time > self._sun_data["next_rising_civil"]
|
|
657
|
+
):
|
|
658
|
+
_LOGGER.debug("Astronomical calculations updating sun_next_rising")
|
|
659
|
+
self._calculate_sun()
|
|
660
|
+
|
|
661
|
+
if self._sun_data.get("next_rising_astro", None) is not None:
|
|
662
|
+
return self._sun_data["next_rising_astro"]
|
|
663
|
+
if self._sun_data.get("next_rising_nautical", None) is not None:
|
|
664
|
+
return self._sun_data["next_rising_nautical"]
|
|
665
|
+
if self._sun_data.get("next_rising_civil", None) is not None:
|
|
666
|
+
return self._sun_data["next_rising_civil"]
|
|
667
|
+
|
|
668
|
+
async def sun_next_setting(self) -> datetime:
|
|
669
|
+
"""Returns sun next setting."""
|
|
670
|
+
|
|
671
|
+
if (
|
|
672
|
+
not self._test_data(
|
|
673
|
+
self._sun_data,
|
|
674
|
+
["next_rising_astro", "next_rising_nautical", "next_rising_civil"],
|
|
675
|
+
)
|
|
676
|
+
or self._forecast_time > self._sun_data["next_setting_astro"]
|
|
677
|
+
or self._forecast_time > self._sun_data["next_setting_nautical"]
|
|
678
|
+
or self._forecast_time > self._sun_data["next_setting_civil"]
|
|
679
|
+
):
|
|
680
|
+
_LOGGER.debug("Astronomical calculations updating sun_next_setting")
|
|
681
|
+
self._calculate_sun()
|
|
682
|
+
|
|
683
|
+
if self._sun_data.get("next_setting_astro", None) is not None:
|
|
684
|
+
return self._sun_data["next_setting_astro"]
|
|
685
|
+
if self._sun_data.get("next_setting_nautical", None) is not None:
|
|
686
|
+
return self._sun_data["next_setting_nautical"]
|
|
687
|
+
if self._sun_data.get("next_setting_civil", None) is not None:
|
|
688
|
+
return self._sun_data["next_setting_civil"]
|
|
689
|
+
|
|
662
690
|
def _calculate_sun(self):
|
|
663
691
|
"""Calculates sun risings and settings."""
|
|
664
692
|
|
|
@@ -671,6 +699,12 @@ class AstronomicalRoutines:
|
|
|
671
699
|
if self._sun is None:
|
|
672
700
|
self._sun = ephem.Sun()
|
|
673
701
|
|
|
702
|
+
self._calculate_sun_civil()
|
|
703
|
+
self._calculate_sun_nautical()
|
|
704
|
+
self._calculate_sun_astro()
|
|
705
|
+
self._calculate_sun_altaz()
|
|
706
|
+
|
|
707
|
+
def _calculate_sun_civil(self):
|
|
674
708
|
# Rise and Setting (Civil)
|
|
675
709
|
try:
|
|
676
710
|
self._sun_data["next_rising_civil"] = (
|
|
@@ -720,6 +754,7 @@ class AstronomicalRoutines:
|
|
|
720
754
|
continue
|
|
721
755
|
break
|
|
722
756
|
|
|
757
|
+
def _calculate_sun_nautical(self):
|
|
723
758
|
# Rise and Setting (Nautical)
|
|
724
759
|
self._sun_observer_nautical.date = self._forecast_time
|
|
725
760
|
self._sun.compute(self._sun_observer_nautical)
|
|
@@ -776,6 +811,7 @@ class AstronomicalRoutines:
|
|
|
776
811
|
continue
|
|
777
812
|
break
|
|
778
813
|
|
|
814
|
+
def _calculate_sun_astro(self):
|
|
779
815
|
# Rise and Setting (Astronomical)
|
|
780
816
|
self._sun_observer_astro.date = self._forecast_time
|
|
781
817
|
self._sun.compute(self._sun_observer_astro)
|
|
@@ -884,8 +920,6 @@ class AstronomicalRoutines:
|
|
|
884
920
|
continue
|
|
885
921
|
break
|
|
886
922
|
|
|
887
|
-
self._calculate_sun_altaz()
|
|
888
|
-
|
|
889
923
|
def _calculate_sun_altaz(self):
|
|
890
924
|
"""Calculates sun altitude and azimuth."""
|
|
891
925
|
|
|
@@ -903,59 +937,15 @@ class AstronomicalRoutines:
|
|
|
903
937
|
# Sun Azimuth
|
|
904
938
|
self._sun_data["azimuth"] = deg(float(self._sun.az))
|
|
905
939
|
|
|
906
|
-
async def sun_next_rising(self) -> datetime:
|
|
907
|
-
"""Returns sun next rising."""
|
|
908
|
-
|
|
909
|
-
if (
|
|
910
|
-
not self._test_data(
|
|
911
|
-
self._sun_data,
|
|
912
|
-
["next_rising_astro", "next_rising_nautical", "next_rising_civil"],
|
|
913
|
-
)
|
|
914
|
-
or self._forecast_time > self._sun_data["next_rising_astro"]
|
|
915
|
-
or self._forecast_time > self._sun_data["next_rising_nautical"]
|
|
916
|
-
or self._forecast_time > self._sun_data["next_rising_civil"]
|
|
917
|
-
):
|
|
918
|
-
_LOGGER.debug("Astronomical calculations updating sun_next_rising")
|
|
919
|
-
self._calculate_sun()
|
|
920
|
-
|
|
921
|
-
if self._sun_data.get("next_rising_astro", None) is not None:
|
|
922
|
-
return self._sun_data["next_rising_astro"]
|
|
923
|
-
if self._sun_data.get("next_rising_nautical", None) is not None:
|
|
924
|
-
return self._sun_data["next_rising_nautical"]
|
|
925
|
-
if self._sun_data.get("next_rising_civil", None) is not None:
|
|
926
|
-
return self._sun_data["next_rising_civil"]
|
|
927
|
-
|
|
928
|
-
async def sun_next_setting(self) -> datetime:
|
|
929
|
-
"""Returns sun next setting."""
|
|
930
|
-
|
|
931
|
-
if (
|
|
932
|
-
not self._test_data(
|
|
933
|
-
self._sun_data,
|
|
934
|
-
["next_rising_astro", "next_rising_nautical", "next_rising_civil"],
|
|
935
|
-
)
|
|
936
|
-
or self._forecast_time > self._sun_data["next_setting_astro"]
|
|
937
|
-
or self._forecast_time > self._sun_data["next_setting_nautical"]
|
|
938
|
-
or self._forecast_time > self._sun_data["next_setting_civil"]
|
|
939
|
-
):
|
|
940
|
-
_LOGGER.debug("Astronomical calculations updating sun_next_setting")
|
|
941
|
-
self._calculate_sun()
|
|
942
|
-
|
|
943
|
-
if self._sun_data.get("next_setting_astro", None) is not None:
|
|
944
|
-
return self._sun_data["next_setting_astro"]
|
|
945
|
-
if self._sun_data.get("next_setting_nautical", None) is not None:
|
|
946
|
-
return self._sun_data["next_setting_nautical"]
|
|
947
|
-
if self._sun_data.get("next_setting_civil", None) is not None:
|
|
948
|
-
return self._sun_data["next_setting_civil"]
|
|
949
|
-
|
|
950
|
-
async def sun_data(self) -> dict:
|
|
951
|
-
"""Returns moon data."""
|
|
952
|
-
|
|
953
|
-
if self._sun_data is not None:
|
|
954
|
-
return self._sun_data
|
|
955
|
-
|
|
956
940
|
# #########################################################################
|
|
957
941
|
# Moon
|
|
958
942
|
# #########################################################################
|
|
943
|
+
async def moon_data(self) -> dict:
|
|
944
|
+
"""Returns moon data."""
|
|
945
|
+
|
|
946
|
+
if self._moon_data is not None:
|
|
947
|
+
return self._moon_data
|
|
948
|
+
|
|
959
949
|
def _calculate_moon(self):
|
|
960
950
|
"""Calculates moon rising and setting."""
|
|
961
951
|
|
|
@@ -1096,12 +1086,6 @@ class AstronomicalRoutines:
|
|
|
1096
1086
|
)
|
|
1097
1087
|
print(self._moon_data)
|
|
1098
1088
|
|
|
1099
|
-
async def moon_data(self) -> dict:
|
|
1100
|
-
"""Returns moon data."""
|
|
1101
|
-
|
|
1102
|
-
if self._moon_data is not None:
|
|
1103
|
-
return self._moon_data
|
|
1104
|
-
|
|
1105
1089
|
# #########################################################################
|
|
1106
1090
|
# Darkness
|
|
1107
1091
|
# #########################################################################
|
|
@@ -1305,207 +1289,3 @@ class AstronomicalRoutines:
|
|
|
1305
1289
|
_LOGGER.debug("DSD: Moon is down during astronomical night")
|
|
1306
1290
|
return True
|
|
1307
1291
|
return False
|
|
1308
|
-
|
|
1309
|
-
# async def sun_previous_rising_astro(self) -> datetime:
|
|
1310
|
-
# """Returns sun previous astronomical rising."""
|
|
1311
|
-
|
|
1312
|
-
# if (
|
|
1313
|
-
# self._sun_previous_rising_astro is None
|
|
1314
|
-
# or self._forecast_time > self._sun_previous_rising_astro
|
|
1315
|
-
# ):
|
|
1316
|
-
# _LOGGER.debug(
|
|
1317
|
-
# "Astronomical calculations updating sun_previous_rising_astro"
|
|
1318
|
-
# )
|
|
1319
|
-
# self._calculate_sun()
|
|
1320
|
-
|
|
1321
|
-
# if self._sun_previous_rising_astro is not None:
|
|
1322
|
-
# return self._sun_previous_rising_astro
|
|
1323
|
-
|
|
1324
|
-
# async def sun_previous_setting_astro(self) -> datetime:
|
|
1325
|
-
# """Returns sun previous astronomical setting."""
|
|
1326
|
-
|
|
1327
|
-
# if (
|
|
1328
|
-
# self._sun_previous_setting_astro is None
|
|
1329
|
-
# or self._forecast_time > self._sun_previous_setting_astro
|
|
1330
|
-
# ):
|
|
1331
|
-
# _LOGGER.debug(
|
|
1332
|
-
# "Astronomical calculations updating sun_previous_setting_astro"
|
|
1333
|
-
# )
|
|
1334
|
-
# self._calculate_sun()
|
|
1335
|
-
|
|
1336
|
-
# if self._sun_previous_setting_astro is not None:
|
|
1337
|
-
# return self._sun_previous_setting_astro
|
|
1338
|
-
|
|
1339
|
-
# async def sun_next_rising_civil(self) -> datetime:
|
|
1340
|
-
# """Returns sun next rising."""
|
|
1341
|
-
|
|
1342
|
-
# if (
|
|
1343
|
-
# self._sun_next_setting_civil is None
|
|
1344
|
-
# or self._forecast_time > self._sun_next_setting_civil
|
|
1345
|
-
# ):
|
|
1346
|
-
# _LOGGER.debug("Astronomical calculations updating sun_next_rising_civil")
|
|
1347
|
-
# self._calculate_sun()
|
|
1348
|
-
|
|
1349
|
-
# if self._sun_next_rising_civil is not None:
|
|
1350
|
-
# return self._sun_next_rising_civil
|
|
1351
|
-
|
|
1352
|
-
# async def sun_next_rising_nautical(self) -> datetime:
|
|
1353
|
-
# """Returns sun next nautical rising."""
|
|
1354
|
-
|
|
1355
|
-
# if (
|
|
1356
|
-
# self._sun_next_rising_nautical is None
|
|
1357
|
-
# or self._forecast_time > self._sun_next_rising_nautical
|
|
1358
|
-
# ):
|
|
1359
|
-
# _LOGGER.debug("Astronomical calculations updating sun_next_rising_nautical")
|
|
1360
|
-
# self._calculate_sun()
|
|
1361
|
-
|
|
1362
|
-
# if self._sun_next_rising_nautical is not None:
|
|
1363
|
-
# return self._sun_next_rising_nautical
|
|
1364
|
-
|
|
1365
|
-
# async def sun_next_rising_astro(self) -> datetime:
|
|
1366
|
-
# """Returns sun next astronomical rising."""
|
|
1367
|
-
|
|
1368
|
-
# if (
|
|
1369
|
-
# self._sun_next_rising_astro is None
|
|
1370
|
-
# or self._forecast_time > self._sun_next_rising_astro
|
|
1371
|
-
# ):
|
|
1372
|
-
# _LOGGER.debug("Astronomical calculations updating sun_next_rising_astro")
|
|
1373
|
-
# self._calculate_sun()
|
|
1374
|
-
|
|
1375
|
-
# if self._sun_next_rising_astro is not None:
|
|
1376
|
-
# return self._sun_next_rising_astro
|
|
1377
|
-
|
|
1378
|
-
# async def sun_next_setting_civil(self) -> datetime:
|
|
1379
|
-
# """Returns sun next setting."""
|
|
1380
|
-
|
|
1381
|
-
# if (
|
|
1382
|
-
# self._sun_next_setting_civil is None
|
|
1383
|
-
# or self._forecast_time > self._sun_next_setting_civil
|
|
1384
|
-
# ):
|
|
1385
|
-
# _LOGGER.debug("Astronomical calculations updating sun_next_setting_civil")
|
|
1386
|
-
# self._calculate_sun()
|
|
1387
|
-
|
|
1388
|
-
# if self._sun_next_setting_civil is not None:
|
|
1389
|
-
# return self._sun_next_setting_civil
|
|
1390
|
-
|
|
1391
|
-
# async def sun_next_setting_nautical(self) -> datetime:
|
|
1392
|
-
# """Returns sun next nautical setting."""
|
|
1393
|
-
|
|
1394
|
-
# if (
|
|
1395
|
-
# self._sun_next_setting_nautical is None
|
|
1396
|
-
# or self._forecast_time > self._sun_next_setting_nautical
|
|
1397
|
-
# ):
|
|
1398
|
-
# _LOGGER.debug(
|
|
1399
|
-
# "Astronomical calculations updating sun_next_setting_nautical"
|
|
1400
|
-
# )
|
|
1401
|
-
# self._calculate_sun()
|
|
1402
|
-
|
|
1403
|
-
# if self._sun_next_setting_nautical is not None:
|
|
1404
|
-
# return self._sun_next_setting_nautical
|
|
1405
|
-
|
|
1406
|
-
# async def sun_next_setting_astro(self) -> datetime:
|
|
1407
|
-
# """Returns sun next astronomical setting."""
|
|
1408
|
-
|
|
1409
|
-
# if (
|
|
1410
|
-
# self._sun_next_setting_astro is None
|
|
1411
|
-
# or self._forecast_time > self._sun_next_setting_astro
|
|
1412
|
-
# ):
|
|
1413
|
-
# _LOGGER.debug("Astronomical calculations updating sun_next_setting_astro")
|
|
1414
|
-
# self._calculate_sun()
|
|
1415
|
-
|
|
1416
|
-
# if self._sun_next_setting_astro is not None:
|
|
1417
|
-
# return self._sun_next_setting_astro
|
|
1418
|
-
|
|
1419
|
-
# async def sun_altitude(self) -> float:
|
|
1420
|
-
# """Returns the sun altitude."""
|
|
1421
|
-
|
|
1422
|
-
# self._calculate_sun_altaz()
|
|
1423
|
-
|
|
1424
|
-
# if self._sun_altitude is not None:
|
|
1425
|
-
# return self._sun_altitude
|
|
1426
|
-
|
|
1427
|
-
# async def sun_azimuth(self) -> float:
|
|
1428
|
-
# """Returns the sun azimuth."""
|
|
1429
|
-
|
|
1430
|
-
# self._calculate_sun_altaz()
|
|
1431
|
-
|
|
1432
|
-
# if self._sun_azimuth is not None:
|
|
1433
|
-
# return self._sun_azimuth
|
|
1434
|
-
|
|
1435
|
-
# async def moon_next_rising(self) -> datetime:
|
|
1436
|
-
# """Returns moon next rising."""
|
|
1437
|
-
|
|
1438
|
-
# if (
|
|
1439
|
-
# self._moon_next_rising is None
|
|
1440
|
-
# or self._forecast_time > self._moon_next_rising
|
|
1441
|
-
# ):
|
|
1442
|
-
# _LOGGER.debug("Astronomical calculations updating moon_next_rising")
|
|
1443
|
-
# self._calculate_moon()
|
|
1444
|
-
|
|
1445
|
-
# if self._moon_data.get("next_rising", None) is not None:
|
|
1446
|
-
# return self._moon_next_rising
|
|
1447
|
-
|
|
1448
|
-
# async def moon_next_setting(self) -> datetime:
|
|
1449
|
-
# """Returns moon next setting."""
|
|
1450
|
-
|
|
1451
|
-
# if (
|
|
1452
|
-
# self._moon_next_setting is None
|
|
1453
|
-
# or self._forecast_time > self._moon_next_setting
|
|
1454
|
-
# ):
|
|
1455
|
-
# _LOGGER.debug("Astronomical calculations updating moon_next_setting")
|
|
1456
|
-
# self._calculate_moon()
|
|
1457
|
-
|
|
1458
|
-
# if self._moon_data.get("next_setting", None) is not None:
|
|
1459
|
-
# return self._moon_next_setting
|
|
1460
|
-
|
|
1461
|
-
# async def moon_phase(self) -> float:
|
|
1462
|
-
# """Returns the moon phase."""
|
|
1463
|
-
|
|
1464
|
-
# self._calculate_moon()
|
|
1465
|
-
|
|
1466
|
-
# if self._moon is not None:
|
|
1467
|
-
# return self._moon.phase
|
|
1468
|
-
|
|
1469
|
-
# async def moon_next_new_moon(self) -> float:
|
|
1470
|
-
# """Returns the next new moon."""
|
|
1471
|
-
|
|
1472
|
-
# if (
|
|
1473
|
-
# self._moon_next_new_moon is None
|
|
1474
|
-
# or self._forecast_time > self._moon_next_new_moon
|
|
1475
|
-
# ):
|
|
1476
|
-
# _LOGGER.debug("Astronomical calculations updating moon_next_new_moon")
|
|
1477
|
-
# self._calculate_moon()
|
|
1478
|
-
|
|
1479
|
-
# if self._moon_next_new_moon is not None:
|
|
1480
|
-
# return self._moon_next_new_moon
|
|
1481
|
-
|
|
1482
|
-
# async def moon_next_full_moon(self) -> float:
|
|
1483
|
-
# """Returns the next full moon."""
|
|
1484
|
-
|
|
1485
|
-
# if (
|
|
1486
|
-
# self._moon_next_full_moon is None
|
|
1487
|
-
# or self._forecast_time > self._moon_next_full_moon
|
|
1488
|
-
# ):
|
|
1489
|
-
# _LOGGER.debug("Astronomical calculations updating moon_next_full_moon")
|
|
1490
|
-
# self._calculate_moon()
|
|
1491
|
-
|
|
1492
|
-
# if self._moon_next_full_moon is not None:
|
|
1493
|
-
# return self._moon_next_full_moon
|
|
1494
|
-
|
|
1495
|
-
# async def moon_altitude(self) -> float:
|
|
1496
|
-
# """Returns the moon altitude."""
|
|
1497
|
-
|
|
1498
|
-
# self._calculate_moon_altaz()
|
|
1499
|
-
|
|
1500
|
-
# value = self._moon_data.get("altitude", None)
|
|
1501
|
-
# if value is not None:
|
|
1502
|
-
# return value
|
|
1503
|
-
|
|
1504
|
-
# async def moon_azimuth(self) -> float:
|
|
1505
|
-
# """Returns the moon azimuth."""
|
|
1506
|
-
|
|
1507
|
-
# self._calculate_moon_altaz()
|
|
1508
|
-
|
|
1509
|
-
# value = self._moon_data.get("azimuth", None)
|
|
1510
|
-
# if value is not None:
|
|
1511
|
-
# return value
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pyastroweatherio-0.62.0.dev1 → pyastroweatherio-0.62.0.dev3}/pyastroweatherio.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|