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
1 changed files with 1 additions and 0 deletions

View File

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