Skip to content

Commit

Permalink
Log Reolink select value KeyError only once (#129559)
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG authored and bramkragten committed Oct 31, 2024
1 parent 3f6e9a5 commit 964ab5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/reolink/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def current_option(self) -> str | None:

try:
option = self.entity_description.value(self._host.api, self._channel)
except ValueError:
except (ValueError, KeyError):
if self._log_error:
_LOGGER.exception("Reolink '%s' has an unknown value", self.name)
self._log_error = False
Expand Down Expand Up @@ -314,7 +314,7 @@ def current_option(self) -> str | None:
"""Return the current option."""
try:
option = self.entity_description.value(self._chime)
except ValueError:
except (ValueError, KeyError):
if self._log_error:
_LOGGER.exception("Reolink '%s' has an unknown value", self.name)
self._log_error = False
Expand Down

0 comments on commit 964ab5b

Please sign in to comment.