Remove dead code from concord232 (#128907)

This commit is contained in:
Erik Montnemery 2024-10-21 15:23:43 +02:00 committed by GitHub
parent 106746ce58
commit c0f1996478
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,10 +138,7 @@ class Concord232Alarm(AlarmControlPanelEntity):
"""Validate given code.""" """Validate given code."""
if self._code is None: if self._code is None:
return True return True
if isinstance(self._code, str): alarm_code = self._code
alarm_code = self._code
else:
alarm_code = self._code.render(from_state=self._attr_state, to_state=state)
check = not alarm_code or code == alarm_code check = not alarm_code or code == alarm_code
if not check: if not check:
_LOGGER.warning("Invalid code given for %s", state) _LOGGER.warning("Invalid code given for %s", state)