Skip to content

Commit

Permalink
Merge pull request #104 from patrickvorgers/main
Browse files Browse the repository at this point in the history
Ignore hp2 warnings for single quatt installations #86
  • Loading branch information
marcoboers committed Sep 6, 2024
2 parents b17f47a + db82c63 commit c7f716b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_components/quatt/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""DataUpdateCoordinator for quatt."""

from __future__ import annotations

from datetime import timedelta
Expand Down Expand Up @@ -248,8 +249,10 @@ def getValue(self, value_path: str, default: float = None):
method = getattr(self, key)
return method(parent_key)
elif key not in value:
LOGGER.warning("Could not find %s of %s", key, value_path)
LOGGER.debug("in %s", value)
"""Ignore any warnings about hp2 - for single quatt installations it is valid that hp2 does not exist."""
if key != "hp2":
LOGGER.warning("Could not find %s of %s", key, value_path)
LOGGER.debug("in %s", value)
return default
value = value[key]
parent_key = key
Expand Down

0 comments on commit c7f716b

Please sign in to comment.