diff --git a/custom_components/battery_notes/coordinator.py b/custom_components/battery_notes/coordinator.py index 85220952..dd58db5a 100644 --- a/custom_components/battery_notes/coordinator.py +++ b/custom_components/battery_notes/coordinator.py @@ -716,7 +716,7 @@ def last_reported_level(self, value: float): self.async_update_device_config(device_id=self.device_id, data=entry) @property - def battery_low(self) -> bool: + def battery_low(self) -> bool | None: """Check if battery low against threshold.""" if self.battery_low_template: return self.battery_low_template_state @@ -725,10 +725,12 @@ def battery_low(self) -> bool: return bool( float(self.current_battery_level) < self.battery_low_threshold ) + else: + return None elif self.wrapped_battery_low: return self.battery_low_binary_state - return False + return None @property def rounded_battery_level(self) -> float: