mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Log Reolink select value KeyError only once (#129559)
This commit is contained in:
parent
3f6e9a54fe
commit
964ab5b351
@ -272,7 +272,7 @@ class ReolinkSelectEntity(ReolinkChannelCoordinatorEntity, SelectEntity):
|
||||
|
||||
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 @@ class ReolinkChimeSelectEntity(ReolinkChimeCoordinatorEntity, SelectEntity):
|
||||
"""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
|
||||
|
Loading…
x
Reference in New Issue
Block a user