Update remove_trigger method
@@ -47,7 +47,10 @@ class FileWatchSensor(Sensor):
pass
def remove_trigger(self, trigger):
- if trigger['type'] not in ['linux.file_watch.file_path']:
+ file_path = trigger['parameters'].get('file_path', None)
+
+ if not file_path:
+ self._logger.error('Received trigger type without "file_path" field.')
return
file_path = trigger['parameters']['file_path']
