From 964ab5b3515818577962373cfedc4b752de74439 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Thu, 31 Oct 2024 09:49:27 +0100 Subject: [PATCH] Log Reolink select value KeyError only once (#129559) --- homeassistant/components/reolink/select.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/reolink/select.py b/homeassistant/components/reolink/select.py index b4175d4106966..1306c881059c5 100644 --- a/homeassistant/components/reolink/select.py +++ b/homeassistant/components/reolink/select.py @@ -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 @@ -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