From 4e4f057694f4372344397a3d611dbe49f1c43084 Mon Sep 17 00:00:00 2001 From: jeremysherriff Date: Fri, 3 Jan 2025 20:47:43 +1300 Subject: [PATCH] Update last run timestamp on correct objects --- lnxlink/modules/bash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnxlink/modules/bash.py b/lnxlink/modules/bash.py index 8ec1fac..f2f23b8 100644 --- a/lnxlink/modules/bash.py +++ b/lnxlink/modules/bash.py @@ -21,14 +21,14 @@ def get_info(self): if discovery.get("type") == "sensor": cur_time = time.time() if cur_time - discovery["last_time"] > discovery["update_interval"]: - self.discovery_info[expose_name]["last_time"] = cur_time + discovery["last_time"] = cur_time stdout, _, returncode = syscommand(discovery["local_command"]) if returncode == 0: self.lnxlink.run_module(f"{self.name}/{expose_name}", stdout) elif discovery.get("type") == "binary_sensor": cur_time = time.time() if cur_time - discovery["last_time"] > discovery["update_interval"]: - self.discovery_info[expose_name]["last_time"] = cur_time + discovery["last_time"] = cur_time stdout, _, _ = syscommand(discovery["local_command"]) status = stdout.lower() not in ["false", "no", "0", ""] senddata = {