Skip to content

Commit

Permalink
Remove ozone sensor (#182)
Browse files Browse the repository at this point in the history
* Remove ozone sensor

* Update tests
  • Loading branch information
bieniu committed May 15, 2023
1 parent c0adfa6 commit 8b77ecc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
7 changes: 0 additions & 7 deletions accuweather/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,7 @@ def _parse_forecast_daily(
]

for day in parsed_data:
# For some forecast days, the API does not provide an Ozone value.
day.setdefault("Ozone", {})
day["Ozone"].setdefault("Value")
day["Ozone"].setdefault("Category")

for item in day["AirAndPollen"]:
if item["Name"] == "AirQuality":
day[item["Type"]] = item
day[item["Name"]] = item
day[item["Name"]]["Category"] = day[item["Name"]]["Category"].lower()
day[item["Name"]].pop("Name")
Expand Down
1 change: 0 additions & 1 deletion tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ async def test_get_forecast():
assert forecast[0]["WindDay"]["Speed"]["Value"] == 13.0
assert forecast[0]["TemperatureMax"]["Value"] == 24.8
assert forecast[0]["TemperatureMax"]["Unit"] == "C"
assert forecast[0]["Ozone"]["Value"] == 23
assert accuweather.requests_remaining == 23


Expand Down

0 comments on commit 8b77ecc

Please sign in to comment.