Skip to content

Commit af37e83

Browse files
authored
Fix on_since for smartstrip sockets (#529)
1 parent 85c8410 commit af37e83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kasa/smartstrip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def on_since(self) -> Optional[datetime]:
360360
info = self._get_child_info()
361361
on_time = info["on_time"]
362362

363-
return self.time - timedelta(seconds=on_time)
363+
return datetime.now().replace(microsecond=0) - timedelta(seconds=on_time)
364364

365365
@property # type: ignore
366366
@requires_update

0 commit comments

Comments
 (0)