mirror of
https://github.com/jdejaegh/irm-kmi-ha.git
synced 2025-06-27 03:35:56 +02:00
Compare commits
2 commits
117c2d5030
...
3ef90ba688
Author | SHA1 | Date | |
---|---|---|---|
3ef90ba688 | |||
0a64e7eec2 |
2 changed files with 2 additions and 3 deletions
|
@ -12,5 +12,5 @@
|
||||||
"svgwrite==1.4.3",
|
"svgwrite==1.4.3",
|
||||||
"aiofile==3.9.0"
|
"aiofile==3.9.0"
|
||||||
],
|
],
|
||||||
"version": "0.2.27"
|
"version": "0.2.28"
|
||||||
}
|
}
|
|
@ -71,7 +71,6 @@ class PollenParser:
|
||||||
for e in elements if 'tspan' in e.tag and self._get_elem_text(e) in POLLEN_LEVEL_TO_COLOR}
|
for e in elements if 'tspan' in e.tag and self._get_elem_text(e) in POLLEN_LEVEL_TO_COLOR}
|
||||||
|
|
||||||
level_dots = {e.attrib.get('cx', None) for e in elements if 'circle' in e.tag}
|
level_dots = {e.attrib.get('cx', None) for e in elements if 'circle' in e.tag}
|
||||||
print(level_dots)
|
|
||||||
|
|
||||||
# For each pollen name found, check the text just below.
|
# For each pollen name found, check the text just below.
|
||||||
# As of January 2025, the text is always 'active' and the dot shows the real level
|
# As of January 2025, the text is always 'active' and the dot shows the real level
|
||||||
|
@ -80,7 +79,7 @@ class PollenParser:
|
||||||
# Determine pollen level based on text
|
# Determine pollen level based on text
|
||||||
if position is not None and position in pollen_levels:
|
if position is not None and position in pollen_levels:
|
||||||
pollen_data[pollen] = pollen_levels[position]
|
pollen_data[pollen] = pollen_levels[position]
|
||||||
print(f"{pollen} is {pollen_data[pollen]} according to text")
|
_LOGGER.debug(f"{pollen} is {pollen_data[pollen]} according to text")
|
||||||
|
|
||||||
# If text is 'active' or if there is no text, check the dot as a fallback
|
# If text is 'active' or if there is no text, check the dot as a fallback
|
||||||
if pollen_data[pollen] not in {'none', 'active'}:
|
if pollen_data[pollen] not in {'none', 'active'}:
|
||||||
|
|
Loading…
Add table
Reference in a new issue