bug-fix missing battery

This commit is contained in:
Dirk Alders 2023-01-06 21:36:31 +01:00
parent 5f00c13710
commit ff6d170a94

View File

@ -801,7 +801,7 @@ class brennenstuhl_heatingvalve(base):
self.KEY_CHILD_LOCK: "UNLOCK", self.KEY_VALVE_DETECTION: "ON", self.KEY_SYSTEM_MODE: "heat"}))
def warning_call_condition(self):
return self.get(self.KEY_BATTERY) <= BATTERY_WARN_LEVEL
return self.get(self.KEY_BATTERY, 100) <= BATTERY_WARN_LEVEL
def warning_text(self):
return "Low battery level detected for %s. Battery level was %.0f%%." % (self.topic, self.get(self.KEY_BATTERY))