Skip to content

Commit

Permalink
Fix next slot time showing when no charge in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-r committed Dec 27, 2023
1 parent 786d13e commit f9e3537
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/ohme/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def native_value(self):
@callback
def _handle_coordinator_update(self) -> None:
"""Calculate next timeslot. This is a bit slow so we only update on coordinator data update."""
if self.coordinator.data is None:
if self.coordinator.data is None or self.coordinator.data["mode"] == "DISCONNECTED":
self._state = None
else:
self._state = charge_graph_next_slot(
Expand Down

0 comments on commit f9e3537

Please sign in to comment.