Fix on_since for smartstrip sockets (#529)

This commit is contained in:
Teemu R 2023-10-16 19:37:55 +02:00 committed by GitHub
parent 85c8410c3d
commit af37e83db1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -360,7 +360,7 @@ class SmartStripPlug(SmartPlug):
info = self._get_child_info()
on_time = info["on_time"]
return self.time - timedelta(seconds=on_time)
return datetime.now().replace(microsecond=0) - timedelta(seconds=on_time)
@property # type: ignore
@requires_update