Skip to content

Commit

Permalink
Fix Blocking calls detected
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscamicas committed Sep 11, 2024
1 parent 36a8f28 commit 6ea331e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.1] - 2024-09-11
- Fix Blocking calls detected

## [1.1.0] - 2024-05-19
- Fix incorrect values in Energy Dashboard

Expand Down
3 changes: 1 addition & 2 deletions custom_components/gazdebordeaux/gazdebordeaux.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

INPUT_DATE_FORMAT = "%Y-%m-%d"

paris_tz = pytz.timezone('Europe/Paris')
Logger = logging.getLogger(__name__)

# ------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -56,7 +57,6 @@ async def async_get_total_usage(self):
monthly_data = await self.async_get_data(None, None, "year")
# Logger.debug("Data retreived %s", monthly_data)

paris_tz = pytz.timezone('Europe/Paris')
d = monthly_data["total"]
return TotalUsageRead(
amountOfEnergy = d["amountOfEnergy"],
Expand All @@ -70,7 +70,6 @@ async def async_get_daily_usage(self, start: datetime|None, end: datetime|None)

usageReads: List[DailyUsageRead] = []

paris_tz = pytz.timezone('Europe/Paris')
for d in daily_data:
if d == "total":
continue
Expand Down
2 changes: 1 addition & 1 deletion custom_components/gazdebordeaux/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"issue_tracker": "https://github.com/chriscamicas/gazdebordeaux-ha/issues",
"requirements": [
],
"version": "1.1.0"
"version": "1.1.1"
}

0 comments on commit 6ea331e

Please sign in to comment.