Compare commits
	
		
			7 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 2e1ede071e | ||
|  | 8fb322283c | ||
|  | 35ed25cf3f | ||
|  | d20b48e6b1 | ||
|  | d1438f9a0b | ||
|  | c1b7b16251 | ||
|  | e6c2644ea5 | 
| @@ -16,7 +16,7 @@ from .crawler import CovidCrawler | |||||||
|  |  | ||||||
| _LOGGER = logging.getLogger(__name__) | _LOGGER = logging.getLogger(__name__) | ||||||
|  |  | ||||||
| __version__ = "0.1.0" | __version__ = "1.3.1" | ||||||
|  |  | ||||||
| PLATFORMS = ["sensor"] | PLATFORMS = ["sensor"] | ||||||
|  |  | ||||||
|   | |||||||
| @@ -109,7 +109,7 @@ class CovidCrawler(CovidCrawlerBase): | |||||||
|         ) |         ) | ||||||
|         soup = await self._fetch(url) |         soup = await self._fetch(url) | ||||||
|  |  | ||||||
|         match = soup.find(id="c1067628") |         match = soup.find(id="c1075340") | ||||||
|         text = match.text.strip() |         text = match.text.strip() | ||||||
|         _log.debug(f"Infection data text: {text}") |         _log.debug(f"Infection data text: {text}") | ||||||
|  |  | ||||||
| @@ -167,9 +167,9 @@ class CovidCrawler(CovidCrawlerBase): | |||||||
|         result = soup.find(id=container_id) |         result = soup.find(id=container_id) | ||||||
|         text = re.sub(r"\s+", " ", result.text) |         text = re.sub(r"\s+", " ", result.text) | ||||||
|         regexes = [ |         regexes = [ | ||||||
|             r"(?P<total_vaccinations>\d+([.]\d+)?) Personen in Augsburg mindestens", |             r"(?P<total_vaccinations>\d+([.]\d+)?) Personen in Augsburg", | ||||||
|             r"(?P<num_vaccinated_full>\d+([.]\d+)?) Personen sind mindestens zweimal geimpft", |             r"(?P<num_vaccinated_full>\d+([.]\d+)?) Personen in Augsburg", | ||||||
|             r"(?P<num_vaccinated_booster>\d+([.]\d+)?) Personen haben eine Auffrischungsimpfung", |             r"(?P<num_vaccinated_booster>\d+([.]\d+)?) Personen, also", | ||||||
|         ] |         ] | ||||||
|         values = {} |         values = {} | ||||||
|         for r in regexes: |         for r in regexes: | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| { | { | ||||||
|   "domain": "covid19_augsburg", |   "domain": "covid19_augsburg", | ||||||
|   "name": "COVID-19 Augsburg", |   "name": "COVID-19 Augsburg", | ||||||
|   "version": "1.2.1", |   "version": "1.3.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", | ||||||
|   | |||||||
| @@ -51,7 +51,7 @@ class CoronaAugsburgSensor(Entity): | |||||||
|         return self.coordinator.data["incidence"].incidence |         return self.coordinator.data["incidence"].incidence | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def device_state_attributes(self): |     def extra_state_attributes(self): | ||||||
|         data = self.coordinator.data["incidence"] |         data = self.coordinator.data["incidence"] | ||||||
|         return asdict(data) |         return asdict(data) | ||||||
|  |  | ||||||
| @@ -98,7 +98,7 @@ class CoronaAugsburgVaccinationSensor(Entity): | |||||||
|         return self.coordinator.data["vaccination"].total_vaccinations |         return self.coordinator.data["vaccination"].total_vaccinations | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def device_state_attributes(self): |     def extra_state_attributes(self): | ||||||
|         data = self.coordinator.data["vaccination"] |         data = self.coordinator.data["vaccination"] | ||||||
|         return asdict(data) |         return asdict(data) | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										1021
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1021
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,6 +1,6 @@ | |||||||
| [tool.poetry] | [tool.poetry] | ||||||
| name = "home_assistant_covid19_augsburg" | name = "home_assistant_covid19_augsburg" | ||||||
| version = "1.2.1" | version = "1.3.1" | ||||||
| description = "" | description = "" | ||||||
| authors = ["Adrian Rumpold <a.rumpold@gmail.com>"] | authors = ["Adrian Rumpold <a.rumpold@gmail.com>"] | ||||||
| packages = [ | packages = [ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user