#Goal:Write charging data to a file in Home Assistant using the notify.file integration.

1 messages · Page 1 of 1 (latest)

quasi granite
#

What has been done so far:

  • Added the following to configuration.yaml:
notify:
  - name: charging_log
    platform: file
    filename: charging_log.csv
  • Verified:

    • No duplicate notify: entries exist.
    • The file charging_log.csv is manually created in /config/.
  • Tried multiple file paths:

    • charging_log.csv
    • logs/charging_log.csv
    • /config/charging_log.csv
    • /logs/charging_log.csv
  • Ran Configuration Check in Developer Tools → YAML → Check Configuration: passed.

  • Performed full restart of Home Assistant (not just reloading YAML).

  • Tried calling the service via GUI:

    • notify.charging_log does not appear in Developer Tools → Actions → Call service.
    • Manually entering it in an automation gives this error:
      Error: Action notify.charging_log not found
  • Example automation tested:

alias: Simpel log til fil
trigger:
  - platform: time_pattern
    minutes: "/5"
action:
  - service: notify.charging_log
    data:
      message: "{{ now() }},{{ states('sensor.positive_active_power') }}"
mode: single
  • Error output when it runs:
Error: Action notify.charging_log not found
  • Verified:

    • Other notify services (e.g., mobile notifications) are working.
    • "File Notifications" integration or similar does not show under Settings → Integrations.
    • File access attempts through /config/ and logs/ fail with:
      Access to the selected file path is not allowed

Environment Info:

  • Installation: Home Assistant OS
  • Core: 2025.6.1
  • Supervisor: 2025.05.5
  • OS: 15.2
  • Frontend: 20250531.3
  • No access to terminal – only GUI
lunar willowBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

little plume
#

Please fix the formatting

quasi granite
#

Done ! Sorry

little plume
#

The error message is indicating that you didn't

quasi granite
#

I'm trying to log power data to a CSV file from Home Assistant using the Notification to File integration, but I'm hitting an error.

What I've done:

  • Home Assistant OS 2025.6.1
  • Installed the "Notification to File" integration via Settings > Devices & Services > Add Integration
  • Set the file name to charging_log.csv (full path: /config/charging_log.csv)
  • The file exists and is writable
  • No notify: section in configuration.yaml
  • Restarted Home Assistant fully (not just YAML reload)
  • Integration appears as:
Integration entries
Notify [charging_log.csv]
1 entity

Automation used:

alias: Log power to file every 5 minutes
trigger:
  - platform: time_pattern
    minutes: "/5"
action:
  - service: notify.notify_charging_log_csv
    data:
      message: "{{ now() }},{{ states('sensor.positive_active_power') }}"
mode: single

Error shown when automation runs or I trigger the service manually:

Error: Action notify.notify_charging_log_csv not found

I cannot find the service in Developer Tools → Actions either.

Any ideas what I’m missing?

little plume
#

Did you just repost your original post?

#

I already suggested something

quasi granite
#

as you can see i have created the things you post

little plume
#

I don't see anywhere that you said you added the path to the allowlist

quasi granite
#

Sorry

homeassistant:
  allowlist_external_dirs:
    - "/config"
    - "/config/logs"
#

when i run the automation

triggers:
  - minutes: /5
    trigger: time_pattern
actions:
  - data:
      message: "{{ now() }},{{ states('sensor.positive_active_power') }}"
    action: notify.notify_charging_log_csv
mode: single```

i get this !


```Perform action 'notify.notify_charging_log_csv'
Executed: June 22, 2025 at 00:21:32
Error: Action notify.notify_charging_log_csv not found
Result:
params:
  domain: notify
  service: notify_charging_log_csv
  service_data:
    message: 2025-06-22 00:21:32.592464+02:00,unknown
  target: {}
running_script: false```
little plume
#

I just ran a test and it worked fine

#

YAML looks like this:

action: notify.send_message
target:
  entity_id: notify.file
data:
  message: test
#

you're trying to use a notify action that doesn't exist

#

Use the notify.send_message entity to store notification messages.

#
rcoleman@rcoleman-linux ➜  /config git:(main) ✗ cat charging_log.csv 
Home Assistant notifications (Log started: 2025-06-21T22:25:19.904069+00:00)
--------------------------------------------------------------------------------
test