mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Remove not needed code check in yale_smart_alarm (#132649)
This commit is contained in:
parent
eddb416f6d
commit
e0bb044782
@ -9,7 +9,7 @@ from yalesmartalarmclient import YaleLock, YaleLockState
|
||||
from homeassistant.components.lock import LockEntity, LockState
|
||||
from homeassistant.const import ATTR_CODE
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError, ServiceValidationError
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from . import YaleConfigEntry
|
||||
@ -65,12 +65,6 @@ class YaleDoorlock(YaleLockEntity, LockEntity):
|
||||
|
||||
async def async_set_lock(self, state: YaleLockState, code: str | None) -> None:
|
||||
"""Set lock."""
|
||||
if state is YaleLockState.UNLOCKED and not code:
|
||||
raise ServiceValidationError(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="no_code",
|
||||
)
|
||||
|
||||
lock_state = False
|
||||
try:
|
||||
if state is YaleLockState.LOCKED:
|
||||
|
@ -88,9 +88,6 @@
|
||||
"set_lock": {
|
||||
"message": "Could not set lock for {name}: {error}"
|
||||
},
|
||||
"no_code": {
|
||||
"message": "Can not unlock without code"
|
||||
},
|
||||
"could_not_change_lock": {
|
||||
"message": "Could not set lock, check system ready for lock"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user