Skip to content

Commit 116f753

Browse files
authored
charging state updated (#22)
Signed-off-by: Sandro Cantarella <sandro@cabf9afe-642b-4ef6-b6d4-34d9c877830b.fritz.box>
1 parent 6738b14 commit 116f753

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SCR/valetudo_map_parser/config/shared.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ def vacuum_bat_charged(self) -> bool:
126126
"""Check if the vacuum is charging."""
127127
if self.vacuum_state != "docked":
128128
self._battery_state = "not_charging"
129-
elif (self._battery_state == "charging") and (int(self.vacuum_battery) == 100):
129+
elif (self._battery_state == "charging_done") and (int(self.vacuum_battery) == 100):
130130
self._battery_state = "charged"
131131
else:
132-
self._battery_state = "charging" if int(self.vacuum_battery) < 100 else "not_charging"
133-
return (self.vacuum_state == "docked") and (self._battery_state == "charged")
132+
self._battery_state = "charging" if int(self.vacuum_battery) < 100 else "charging_done"
133+
return (self.vacuum_state == "docked") and (self._battery_state == "charging")
134134

135135
@staticmethod
136136
def _compose_obstacle_links(vacuum_host_ip: str, obstacles: list) -> list | None:

0 commit comments

Comments
 (0)