Adjust manual alarm control panel integration

This commit is contained in:
Franck Nijhof
2020-10-26 17:17:00 +01:00
parent 31ed6edc68
commit 4a94f9cfb4

View File

@@ -385,7 +385,9 @@ class ManualAlarm(alarm.AlarmControlPanelEntity, RestoreEntity):
if isinstance(self._code, str): if isinstance(self._code, str):
alarm_code = self._code alarm_code = self._code
else: else:
alarm_code = self._code.render(from_state=self._state, to_state=state) alarm_code = self._code.render(
parse_result=False, from_state=self._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)