1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-06-09 18:02:34 +02:00

Door: mark from_string as static method

This commit is contained in:
Markus 2021-10-18 18:06:51 +02:00
parent ed239fb284
commit b7000388bc

View File

@ -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