Compare commits

..

3 Commits

Author SHA1 Message Date
Adrian Rumpold fc5f6e7c93 Merge pull request #11 from AdrianoKF/10-negative-first-vaccination-doses
Fix for negative number of first vaccination doses
2021-11-11 19:56:00 +01:00
Adrian Rumpold fa052cdfc9 chore: Bump version number for release 2021-11-11 19:51:26 +01:00
Adrian Rumpold f6f799e85f fix(crawler): Fix invalid calculation of number of first vaccinations
Numbers for second shot are actually inclusive of booster
shots, so booster shots do not
have to be subtracted from the
total number of vaccinations.

Fixes #10.
2021-11-11 19:50:44 +01:00
3 changed files with 17 additions and 13 deletions
@@ -187,8 +187,8 @@ class CovidCrawler(CovidCrawlerBase):
if not matches: if not matches:
raise ValueError(f"Could not extract date from scraped web page, {text=}") raise ValueError(f"Could not extract date from scraped web page, {text=}")
values["num_vaccinated_once"] = values["total_vaccinations"] - ( values["num_vaccinated_once"] = (
values["num_vaccinated_full"] + values["num_vaccinated_booster"] values["total_vaccinations"] - values["num_vaccinated_full"]
) )
values["date"] = parse_date(**matches.groupdict()).strftime("%Y-%m-%d") values["date"] = parse_date(**matches.groupdict()).strftime("%Y-%m-%d")
@@ -1,11 +1,15 @@
{ {
"domain": "covid19_augsburg", "domain": "covid19_augsburg",
"name": "COVID-19 Augsburg", "name": "COVID-19 Augsburg",
"version": "1.2.0", "version": "1.2.1",
"config_flow": true, "config_flow": true,
"documentation": "https://github.com/AdrianoKF/home-assistant-covid19-augsburg", "documentation": "https://github.com/AdrianoKF/home-assistant-covid19-augsburg",
"issue_tracker": "https://github.com/AdrianoKF/home-assistant-covid19-augsburg/issues", "issue_tracker": "https://github.com/AdrianoKF/home-assistant-covid19-augsburg/issues",
"requirements": ["beautifulsoup4==4.8.2"], "requirements": [
"dependencies": [], "beautifulsoup4==4.8.2"
"codeowners": ["@AdrianoKF"] ],
} "dependencies": [],
"codeowners": [
"@AdrianoKF"
]
}
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "home_assistant_covid19_augsburg" name = "home_assistant_covid19_augsburg"
version = "0.1.0" version = "1.2.1"
description = "" description = ""
authors = ["Adrian Rumpold <a.rumpold@gmail.com>"] authors = ["Adrian Rumpold <a.rumpold@gmail.com>"]
packages = [ packages = [