From d2a34642fac15f1b27eb5790eccdd050221d79d8 Mon Sep 17 00:00:00 2001 From: Chris <1105672+firstof9@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:59:41 -0700 Subject: [PATCH] refactor: change `STATE_LOCKED` and `STATE_UNLOCKED` to use `LockState` (#391) --- custom_components/keymaster/const.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/keymaster/const.py b/custom_components/keymaster/const.py index 20791d18..949645b9 100644 --- a/custom_components/keymaster/const.py +++ b/custom_components/keymaster/const.py @@ -1,6 +1,6 @@ """Constants for keymaster.""" -from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED +from homeassistant.components.lock.const import LockState DOMAIN = "keymaster" VERSION = "v0.0.0" # this will be automatically updated as part of the release workflow @@ -115,11 +115,11 @@ LOCK_STATE_MAP = { ALARM_TYPE: { - STATE_LOCKED: 24, - STATE_UNLOCKED: 25, + LockState.LOCKED: 24, + LockState.UNLOCKED: 25, }, ACCESS_CONTROL: { - STATE_LOCKED: 3, - STATE_UNLOCKED: 4, + LockState.LOCKED: 3, + LockState.UNLOCKED: 4, }, }