New File integration is driving me crazy

Hi everyone,
I’m pretty much upset, because after the update, again nothing is working anymore. Nearly all my Automations are nicely logging into files, but since this stopped out of a sudden, I have to rework each and every one of them. :frowning:

I got so far that the File Integration has been installed, but when I try to enter a directory, it always tells me that the path would ‘not be allowed’.
Could somebody tell me, how to set this up properly? I’ve already added directories to the ‘allowlist_external_dirs’, but this did not change anything.

I’m running the assistant in a VM, so nothing special about that.

How can I find out, which folders I could use and how can I do it then?

Thanks a lot

I simply added

homeassistant:
  allowlist_external_dirs:
    - "/config"

and my loggings started working again (but still creating a repair about the automations)

After adjusting the automations, no repairs any more.

4 Likes

@francisp : THANKS!!!

@francisp Thanks a lot! I had this entry under default_config instead of homeassistant. After changing that, I was able to enter the folder I wanted the log files to be written in.

The system is still telling mehr that the old notify service would be used (after sending the repair script to work and restarting HA a couple of times), but at least I see some progress.

Ok, at least the assistant is not complaining anymore. Thanks Santa, for the nice gift.

What did I do (maybe for my tomorrow me)?

First I changed my configuration.xml and added:

homeassistant:
  allowlist_external_dirs:
    - "/config"

notify:
  - name: abc_logger
    platform: file
    filename: /config/abc_logger.log
    timestamp: true

The ‘timestamp: true’ is doing nothing in my case. Seems to be still somehow fishy, but hey…

Then I went through all my automation files and changed the following lines

- service: notify.abc_logger
  data:

with

- service: notify.send_message
  data:
    entity_id: notify.abc_logger

I do not know, why this couldn’t have been an automatic migration step during the update, but hey.

In my overwhelming motivation, I changed the way my mobile phones are notified as well, just to match the pattern from above, but this was wrong. Here you still have to stick to:

- service: notify.mobile_app...
  data:
    message: "....

Update:
Nope, I’m still wrong. The assistant was not complaining for a couple of minutes, but after a while, it started again. So I have to continue…

1 Like

I have e.g. this

  - service: notify.send_message
    target: 
      entity_id: notify.notifier_rflink
    data:
      message: '{{now().year}}-{{now().month}}-{{now().day}} {{now().hour}}:{{now().minute}}:{{now().second}}
        -> {{trigger.topic}} - {{ trigger.payload_json}}'
1 Like

Thank you so much for the sample code!!

This has been one of the most poorly-documented breaking changes I’ve seen in HA. And that’s saying a lot.

I’ve just found another file, where I had to change some calls. So yes, at least in my situation the following lines are working:

    - service: notify.send_message
      data:
        entity_id: notify.abc_logger
        message: "You have two items on your shopping list."

But different compared to what @francisp is doing, my code has no ‘target’ set. Interesting.

1 Like