Adjust manual mqtt alarm control panel integration

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

View File

@@ -406,7 +406,9 @@ class ManualMQTTAlarm(alarm.AlarmControlPanelEntity):
if isinstance(self._code, str):
alarm_code = self._code
else:
alarm_code = self._code.render(from_state=self._state, to_state=state)
alarm_code = self._code.render(
from_state=self._state, to_state=state, parse_result=False
)
check = not alarm_code or code == alarm_code
if not check:
_LOGGER.warning("Invalid code given for %s", state)