gazpar2haws 0.3.0b17__tar.gz → 0.3.0b18__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gazpar2haws
3
- Version: 0.3.0b17
3
+ Version: 0.3.0b18
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
 
@@ -182,6 +182,10 @@ class Gazpar:
182
182
  # Fetch daily Gazpar history.
183
183
  def fetch_daily_gazpar_history(self, start_date: date, end_date: date) -> MeterReadings:
184
184
 
185
+ if start_date >= end_date:
186
+ Logger.info("No data to fetch")
187
+ return MeterReadings()
188
+
185
189
  # Instantiate the right data source.
186
190
  data_source = self._create_data_source()
187
191
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gazpar2haws"
3
- version = "0.3.0b17"
3
+ version = "0.3.0b18"
4
4
  description = "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 = { file = "LICENSE" }
6
6
  readme = "README.md"
File without changes
File without changes