From 6d1df49ede4c35d345fa9ebbb420d28be10997d8 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Thu, 10 Oct 2024 16:43:50 +0200 Subject: [PATCH] More sensible bool values for enums --- nucon/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nucon/core.py b/nucon/core.py index fcca48b..d6f0709 100644 --- a/nucon/core.py +++ b/nucon/core.py @@ -33,14 +33,14 @@ class PumpDryStatus(ParameterEnum): INACTIVE_OR_ACTIVE_WITH_FLUID = 4 def __bool__(self): - return self.value == 4 + return self.value == 1 class PumpOverloadStatus(ParameterEnum): ACTIVE_AND_OVERLOAD = 1 INACTIVE_OR_ACTIVE_NO_OVERLOAD = 4 def __bool__(self): - return self.value == 4 + return self.value == 1 class BreakerStatus(ParameterEnum): OPEN = True @@ -312,4 +312,4 @@ class Nucon: return list(super().__dir__()) + list(self._parameters.keys()) def __len__(self): - return len(self._parameters) \ No newline at end of file + return len(self._parameters)