Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 6fad42c

Browse files
authored
Fix next slot time showing when no charge in progress (#5)
1 parent 786d13e commit 6fad42c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/ohme/sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def native_value(self):
157157
@callback
158158
def _handle_coordinator_update(self) -> None:
159159
"""Calculate next timeslot. This is a bit slow so we only update on coordinator data update."""
160-
if self.coordinator.data is None:
160+
if self.coordinator.data is None or self.coordinator.data["mode"] == "DISCONNECTED":
161161
self._state = None
162162
else:
163163
self._state = charge_graph_next_slot(

0 commit comments

Comments
 (0)