Skip to content

Commit

Permalink
πŸ› Completely ignore tuple values
Browse files Browse the repository at this point in the history
They are logged as warning but would fail if processing continued. Let's
skip them
  • Loading branch information
kamaradclimber committed Sep 29, 2024
1 parent c7469af commit 97bf1cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/datadog_agentless/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def _extract_state(new_state: State, entity_id: str, value: Any, main_state: boo
# ignore multivalue colors
return
_LOGGER.warn(f"Hard to convert value {value} which is a tuple to a single value (entity: {entity_id})")
return
# let's ignore "known" string values
if str(value).lower() in ["unavailable", "unknown", "info", "warn", "debug", "error", "on/off", "off/on", "restore", "stop", "opening", "", "scene_mode", "sunny", "cloud", "partlycloudy", "brightness"]:
return None
Expand Down

0 comments on commit 97bf1cf

Please sign in to comment.