mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
Door: mark from_string as static method
This commit is contained in:
parent
ed239fb284
commit
b7000388bc
@ -23,6 +23,7 @@ class DoorState(Enum):
|
|||||||
Present = 1
|
Present = 1
|
||||||
Closed = 2
|
Closed = 2
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
def from_string(string):
|
def from_string(string):
|
||||||
if string == 'lock':
|
if string == 'lock':
|
||||||
return DoorState.Closed
|
return DoorState.Closed
|
||||||
|
Loading…
Reference in New Issue
Block a user