gazpar2haws 0.3.0b18__py3-none-any.whl → 0.3.0b20__py3-none-any.whl

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.
gazpar2haws/gazpar.py CHANGED
@@ -108,7 +108,10 @@ class Gazpar:
108
108
  daily_history = self.fetch_daily_gazpar_history(start_date, self._as_of_date)
109
109
 
110
110
  # The end date is the last date of the daily history
111
- end_date = datetime.strptime(daily_history[-1][pygazpar.PropertyName.TIME_PERIOD.value], "%d/%m/%Y").date()
111
+ if daily_history is None or len(daily_history) == 0:
112
+ end_date = start_date
113
+ else:
114
+ end_date = datetime.strptime(daily_history[-1][pygazpar.PropertyName.TIME_PERIOD.value], "%d/%m/%Y").date()
112
115
 
113
116
  # Extract the volume from the daily history
114
117
  volume_array = self.extract_property_from_daily_gazpar_history(
@@ -184,7 +187,7 @@ class Gazpar:
184
187
 
185
188
  if start_date >= end_date:
186
189
  Logger.info("No data to fetch")
187
- return MeterReadings()
190
+ return []
188
191
 
189
192
  # Instantiate the right data source.
190
193
  data_source = self._create_data_source()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gazpar2haws
3
- Version: 0.3.0b18
3
+ Version: 0.3.0b20
4
4
  Summary: Gazpar2HAWS is a gateway that reads data history from the GrDF (French gas provider) meter and send it to Home Assistant using WebSocket interface
5
5
  License: MIT License
6
6
 
@@ -4,12 +4,12 @@ gazpar2haws/bridge.py,sha256=VEl22xt2Szgk_FVrxSvZNxp3T5Q2JXc9ulfrunHHkmo,3685
4
4
  gazpar2haws/config_utils.py,sha256=yT2G-naMA2Vst6bQdm1bD2oVsPTU3Q_RuukCs-dZ6Ak,2280
5
5
  gazpar2haws/configuration.py,sha256=24q8FUBMS1vpqU6RYAv5Au179HbiBk1CZIEMiBGuXq0,722
6
6
  gazpar2haws/date_array.py,sha256=XQ8gwTl0w97ADjs6igdMZLxtPPrDWTLQzhhzTDVjC4M,8761
7
- gazpar2haws/gazpar.py,sha256=sWTfWBBno-Fym72_cYrKBRpb5u1QgqjutjOKk01AVdE,12848
7
+ gazpar2haws/gazpar.py,sha256=LtRHPUwu3SovkdkF9usd9nkGZJoXGr-xfpXO7bnlk3s,12951
8
8
  gazpar2haws/haws.py,sha256=1ELdompdACNf5XkpjCN6Bdiw7stPfzar3x8OjoBmhxQ,7969
9
9
  gazpar2haws/model.py,sha256=-1yhLNNcEvEtW67GMVLZ4lcXw6Lk75kWvrdjoVgjKCw,7055
10
10
  gazpar2haws/pricer.py,sha256=YhMfvAKSxQhE2JGgrkNOpqQZdTWjGZ_bUtNsYA0u2fs,21932
11
11
  gazpar2haws/version.py,sha256=9Iq5Jm63Ev7QquCjhDqa9_KAgHdKl9FJHynq8M6JNrY,83
12
- gazpar2haws-0.3.0b18.dist-info/LICENSE,sha256=ajApZPyhVx8AU9wN7DXeRGhoWFqY2ylBZUa5GRhTmok,1073
13
- gazpar2haws-0.3.0b18.dist-info/METADATA,sha256=rbIkO5mpekM5T9x7nj8XEYu5TNVffr3GGsIRZTCDyLM,17406
14
- gazpar2haws-0.3.0b18.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
15
- gazpar2haws-0.3.0b18.dist-info/RECORD,,
12
+ gazpar2haws-0.3.0b20.dist-info/LICENSE,sha256=ajApZPyhVx8AU9wN7DXeRGhoWFqY2ylBZUa5GRhTmok,1073
13
+ gazpar2haws-0.3.0b20.dist-info/METADATA,sha256=NwGLFtS_fTZRUkXnurajcpYO7-ZVAASvgbrH07Ax4wM,17406
14
+ gazpar2haws-0.3.0b20.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
15
+ gazpar2haws-0.3.0b20.dist-info/RECORD,,