Skip to content

Commit 5b52744

Browse files
committed
Fix for script execution
1 parent 14905cf commit 5b52744

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/check-config/checkconfig.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ def initialize(self):
3131
if "token" in self.config["plugins"]["HASS"]:
3232
self.auth = "token"
3333
if self.folder_watcher == False:
34-
self.listen_state(self.check_config, "script.check_config")
34+
self.listen_state(self.check_config, "script.check_config", attribute="last_triggered")
3535
else:
3636
self.listen_event(self.config_throttle, "folder_watcher", file="configuration.yaml")
3737
elif "ha_key" in self.config["plugins"]["HASS"]:
3838
self.auth = "key"
3939
if self.folder_watcher == False:
40-
self.listen_state(self.check_config, "script.check_config")
40+
self.listen_state(self.check_config, "script.check_config", attribute="last_triggered")
4141
else:
4242
self.listen_event(self.config_throttle, "folder_watcher", file="configuration.yaml")
4343
else:
@@ -65,7 +65,6 @@ def check_config(self, entity, attribute, old, new, kwargs):
6565

6666
def config_throttle(self, event_name, data, kwargs):
6767
#throttle function to ensure that we don't call check multiple times
68-
self.log("File update event triggered")
6968
self.cancel_timer(self.throttle_timer)
7069
self.throttle_timer = self.run_in(self.auto_check_config, 3)
7170

0 commit comments

Comments
 (0)