chomupashchuk / delete-file-home-assistant

Delete file service for home assistant
MIT License
69 stars 18 forks source link

Feature request #13

Closed lawi75 closed 3 years ago

lawi75 commented 3 years ago

Would be nice to get info about how many files that has been deleted... I do a monthly cleanup of a folder and would like to send a notification to my phone with info about how many files was deleted

BR., Lars

chomupashchuk commented 3 years ago

Integration writes to HA log and deleted files should be visible there. HA does not expect any reply to the service call in form of detailed information. I see few options to achieve what you want:

  1. integrate additional parameters to trigger notification
  2. generate file with deleted files in specific folder with timestamp, so that folder could be monitored and contents sent
  3. create separate script for parsing HA logs (GREP can be used for example if SH or BASH script or python)

Unless more people are interested in such functionality I would rather not include additional logic inside of "delete" integration.