Skip to content

Commit

Permalink
fix parsing of "PT15M" data. Ony parse "PT60M" for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roeland authored and Roeland committed Sep 22, 2024
1 parent abd0f53 commit 3e94e80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions custom_components/entsoe/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ def query_day_ahead_prices(
# Extract TimeSeries data
for timeseries in root.findall("ns:TimeSeries", ns):
period = timeseries.find("ns:Period", ns)
resolution = period.find("ns:resolution", ns).text

if resolution != "PT60M":
continue

start_time = period.find("ns:timeInterval/ns:start", ns).text

date = (
Expand Down
2 changes: 1 addition & 1 deletion custom_components/entsoe/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/JaccoR/hass-entso-e/issues",
"requirements": ["requests"],
"version": "0.5.0"
"version": "0.5.1"
}

0 comments on commit 3e94e80

Please sign in to comment.