The problem
I'm trying to get the File integration to work but all I get is errors.
configuration.yaml:
homeassistant:
allowlist_external_dirs:
- "/config"
notify:
- platform: file
name: export_meterstanden
filename: /config/meterstanden.txt
timestamp: true
the allowlist_external_dirs is probably not needed for config but I used it for other directories as well.
This already triggers an error at boot:
2024-12-07 21:23:17.262 INFO (MainThread) [homeassistant.components.notify] Setting up notify.file
2024-12-07 21:23:17.262 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform file
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 112, in async_setup_platform
raise HomeAssistantError("Invalid notify platform.") # noqa: TRY301
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant.exceptions.HomeAssistantError: Invalid notify platform.
2024-12-07 21:23:17.274 INFO (MainThread) [homeassistant.components.notify] Setting up file.notify
2024-12-07 21:23:17.998 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
I've tried so many options. Different paths, changing the directory with chmod 777, creating the file and adding extra permissions but all give the same error.
No need to say but the automation is also failing because of the setup of File already failed. Here is the automation in the most basic form:
alias: New automation 1
description: New Automation 1
triggers:
- trigger: time_pattern
minutes: /1
conditions: []
actions:
- target:
entity_id: notify.export_meterstanden
data:
message: test123
action: notify.send_message
mode: single
No errors in the traces, just 1 line in the logfile:
2024-12-07 21:43:00.215 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
home-assistant_file_2024-12-07T20-46-26.695Z.log
What version of Home Assistant Core has the issue?
core-2024.12.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
File
Link to integration documentation on our website
https://www.home-assistant.io/integrations/file
Diagnostics information
No response
Example YAML snippet
homeassistant:
allowlist_external_dirs:
- "/config"
notify:
- platform: file
name: export_meterstanden
filename: /config/meterstanden.txt
timestamp: true
Anything in the logs that might be useful for us?
2024-12-07 21:35:52.948 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-12-07 21:35:52.952 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ble_monitor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-12-07 21:36:06.608 INFO (MainThread) [homeassistant.components.notify] Setting up notify.file
2024-12-07 21:36:06.609 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform file
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 112, in async_setup_platform
raise HomeAssistantError("Invalid notify platform.") # noqa: TRY301
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant.exceptions.HomeAssistantError: Invalid notify platform.
2024-12-07 21:36:06.618 INFO (MainThread) [homeassistant.components.notify] Setting up file.notify
2024-12-07 21:36:08.469 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
2024-12-07 21:37:00.181 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:38:00.408 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:38:16.711 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:39:00.298 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:40:00.217 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:41:00.216 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:41:30.973 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:41:42.248 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:42:00.215 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:43:00.215 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:44:00.217 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:45:00.216 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
2024-12-07 21:46:00.216 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
Additional information
No response
The problem
I'm trying to get the File integration to work but all I get is errors.
configuration.yaml:
the allowlist_external_dirs is probably not needed for config but I used it for other directories as well.
This already triggers an error at boot:
2024-12-07 21:23:17.262 INFO (MainThread) [homeassistant.components.notify] Setting up notify.file
2024-12-07 21:23:17.262 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform file
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 112, in async_setup_platform
raise HomeAssistantError("Invalid notify platform.") # noqa: TRY301
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant.exceptions.HomeAssistantError: Invalid notify platform.
2024-12-07 21:23:17.274 INFO (MainThread) [homeassistant.components.notify] Setting up file.notify
2024-12-07 21:23:17.998 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
I've tried so many options. Different paths, changing the directory with chmod 777, creating the file and adding extra permissions but all give the same error.
No need to say but the automation is also failing because of the setup of File already failed. Here is the automation in the most basic form:
No errors in the traces, just 1 line in the logfile:
2024-12-07 21:43:00.215 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available
home-assistant_file_2024-12-07T20-46-26.695Z.log
What version of Home Assistant Core has the issue?
core-2024.12.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
File
Link to integration documentation on our website
https://www.home-assistant.io/integrations/file
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
2024-12-07 21:35:52.948 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-12-07 21:35:52.952 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ble_monitor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-12-07 21:36:06.608 INFO (MainThread) [homeassistant.components.notify] Setting up notify.file 2024-12-07 21:36:06.609 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform file Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 112, in async_setup_platform raise HomeAssistantError("Invalid notify platform.") # noqa: TRY301 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ homeassistant.exceptions.HomeAssistantError: Invalid notify platform. 2024-12-07 21:36:06.618 INFO (MainThread) [homeassistant.components.notify] Setting up file.notify 2024-12-07 21:36:08.469 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app 2024-12-07 21:37:00.181 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:38:00.408 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:38:16.711 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:39:00.298 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:40:00.217 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:41:00.216 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:41:30.973 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:41:42.248 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:42:00.215 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:43:00.215 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:44:00.217 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:45:00.216 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently available 2024-12-07 21:46:00.216 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities notify.export_meterstanden are missing or not currently availableAdditional information
No response