1
0
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:
Markus 2021-10-18 18:06:51 +02:00
parent ed239fb284
commit b7000388bc

View File

@ -23,6 +23,7 @@ class DoorState(Enum):
Present = 1
Closed = 2
@staticmethod
def from_string(string):
if string == 'lock':
return DoorState.Closed