from .const import DOMAIN as DOMAIN, LOGGER as LOGGER
from .discovery import ZwaveDiscoveryInfo as ZwaveDiscoveryInfo
from .entity import ZWaveBaseEntity as ZWaveBaseEntity
from .models import ZwaveJSConfigEntry as ZwaveJSConfigEntry
from homeassistant.components.lock import LockEntity as LockEntity, LockState as LockState
from homeassistant.core import HomeAssistant as HomeAssistant, ServiceResponse as ServiceResponse, callback as callback
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
from typing import Any
from zwave_js_server.const.command_class.lock import OperationType as OperationType

PARALLEL_UPDATES: int
STATE_TO_ZWAVE_MAP: dict[int, dict[str, int | bool]]

async def async_setup_entry(hass: HomeAssistant, config_entry: ZwaveJSConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...

class ZWaveLock(ZWaveBaseEntity, LockEntity):
    @property
    def is_locked(self) -> bool | None: ...
    async def _set_lock_state(self, target_state: LockState, **kwargs: Any) -> None: ...
    async def async_lock(self, **kwargs: Any) -> None: ...
    async def async_unlock(self, **kwargs: Any) -> None: ...
    async def async_set_lock_usercode(self, code_slot: int, usercode: str) -> None: ...
    async def async_get_lock_usercode(self, code_slot: int | None = None) -> ServiceResponse: ...
    @callback
    def _get_single_usercode(self, code_slot: int) -> ServiceResponse: ...
    @callback
    def _get_all_usercodes(self) -> ServiceResponse: ...
    async def async_clear_lock_usercode(self, code_slot: int) -> None: ...
    async def async_set_lock_configuration(self, operation_type: OperationType, lock_timeout: int | None = None, auto_relock_time: int | None = None, hold_and_release_time: int | None = None, twist_assist: bool | None = None, block_to_block: bool | None = None) -> None: ...
