mirror of
https://github.com/binary-kitchen/doorlockd
synced 2025-06-15 23:21:28 +02:00
Door: mark from_string as static method
This commit is contained in:
@ -23,6 +23,7 @@ class DoorState(Enum):
|
||||
Present = 1
|
||||
Closed = 2
|
||||
|
||||
@staticmethod
|
||||
def from_string(string):
|
||||
if string == 'lock':
|
||||
return DoorState.Closed
|
||||
|
Reference in New Issue
Block a user