From 4d428b87cb4cf4bcad6008901bb1df1d14d63979 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sat, 29 May 2021 14:06:02 +0200 Subject: [PATCH] Remove incorrect check in Alexa for SERVICE_ALARM_DISARM fail (#51224) --- homeassistant/components/alexa/handlers.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/alexa/handlers.py b/homeassistant/components/alexa/handlers.py index da0011f817a..79e322b4ea7 100644 --- a/homeassistant/components/alexa/handlers.py +++ b/homeassistant/components/alexa/handlers.py @@ -62,7 +62,6 @@ from .errors import ( AlexaInvalidDirectiveError, AlexaInvalidValueError, AlexaSecurityPanelAuthorizationRequired, - AlexaSecurityPanelUnauthorizedError, AlexaTempRangeError, AlexaUnsupportedThermostatModeError, AlexaVideoActionNotPermittedForContentError, @@ -927,11 +926,9 @@ async def async_api_disarm(hass, config, directive, context): if payload["authorization"]["type"] == "FOUR_DIGIT_PIN": data["code"] = value - if not await hass.services.async_call( + await hass.services.async_call( entity.domain, SERVICE_ALARM_DISARM, data, blocking=True, context=context - ): - msg = "Invalid Code" - raise AlexaSecurityPanelUnauthorizedError(msg) + ) response.add_context_property( {