Skip to content

Commit 5c3e865

Browse files
authored
fix: Replace deprecated constant
* Replace deprecated constant STATE_UNLOCKED has been deprecated * Remove extra space Fixes #307
1 parent 2017416 commit 5c3e865

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/nodered/binary_sensor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
from numbers import Number
44

55
from homeassistant.components.binary_sensor import BinarySensorEntity
6+
from homeassistant.components.lock import LockState
67
from homeassistant.const import (
78
CONF_STATE,
89
STATE_HOME,
910
STATE_ON,
1011
STATE_OPEN,
11-
STATE_UNLOCKED,
1212
)
1313
from homeassistant.helpers.dispatcher import async_dispatcher_connect
1414

@@ -45,7 +45,7 @@ class NodeRedBinarySensor(NodeRedEntity, BinarySensorEntity):
4545
STATE_ON,
4646
STATE_OPEN,
4747
STATE_HOME,
48-
STATE_UNLOCKED,
48+
LockState.UNLOCKED,
4949
)
5050
_component = CONF_BINARY_SENSOR
5151

0 commit comments

Comments
 (0)