Skip to content

Commit

Permalink
refactor: change STATE_LOCKED and STATE_UNLOCKED to use `LockStat…
Browse files Browse the repository at this point in the history
…e` (#391)
  • Loading branch information
firstof9 authored Oct 30, 2024
1 parent 34178e1 commit d2a3464
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions custom_components/keymaster/const.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
},
}

0 comments on commit d2a3464

Please sign in to comment.