Remove incorrect check in Alexa for SERVICE_ALARM_DISARM fail (#51224)
This commit is contained in:
parent
bd34059c11
commit
4d428b87cb
1 changed files with 2 additions and 5 deletions
|
@ -62,7 +62,6 @@ from .errors import (
|
||||||
AlexaInvalidDirectiveError,
|
AlexaInvalidDirectiveError,
|
||||||
AlexaInvalidValueError,
|
AlexaInvalidValueError,
|
||||||
AlexaSecurityPanelAuthorizationRequired,
|
AlexaSecurityPanelAuthorizationRequired,
|
||||||
AlexaSecurityPanelUnauthorizedError,
|
|
||||||
AlexaTempRangeError,
|
AlexaTempRangeError,
|
||||||
AlexaUnsupportedThermostatModeError,
|
AlexaUnsupportedThermostatModeError,
|
||||||
AlexaVideoActionNotPermittedForContentError,
|
AlexaVideoActionNotPermittedForContentError,
|
||||||
|
@ -927,11 +926,9 @@ async def async_api_disarm(hass, config, directive, context):
|
||||||
if payload["authorization"]["type"] == "FOUR_DIGIT_PIN":
|
if payload["authorization"]["type"] == "FOUR_DIGIT_PIN":
|
||||||
data["code"] = value
|
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
|
entity.domain, SERVICE_ALARM_DISARM, data, blocking=True, context=context
|
||||||
):
|
)
|
||||||
msg = "Invalid Code"
|
|
||||||
raise AlexaSecurityPanelUnauthorizedError(msg)
|
|
||||||
|
|
||||||
response.add_context_property(
|
response.add_context_property(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue