jacoscar
(Jacopo)
November 15, 2024, 5:49pm
1
I have just added a file to which I want to write some data periodically called “PDC.csv”
notify:
- platform: file
name: filenotify
filename: /config/data/file.csv
timestamp: true
- platform: file
name: filenotify2
filename: /config/data/file2.csv
timestamp: true
- platform: file
name: filenotify3
filename: /config/data/F1F2F3.csv
timestamp: true
- platform: file
name: filenotify_Leam
filename: /config/data/Leam.csv
timestamp: true
- platform: file
name: filenotify_Leam_daily
filename: /config/data/Leam_daily.csv
timestamp: true
- platform: file
name: filenotify_Leam_daily_inverter
filename: /config/data/Leam_daily_inverter.csv
timestamp: true
- platform: file
name: filenotify_BMS
filename: /config/data/BMS.csv
timestamp: true
- platform: file
name: filenotify_Leam_daily_solar
filename: /config/data/Solar.csv
timestamp: true
- platform: file
name: filenotify_CPDC
filename: /config/data/PDC.csv
timestamp: true
I’ve restarted Home Assistant, however, while I can see the previously created notifyfile services, I cannot see the new one under “developer tools”/“actions” when I start typing notify…
It’s also not visible here
If I try and add it through the UI…
it appears as “file” and not “filenotify”
WallyR
(Wally)
November 16, 2024, 1:29am
2
Probably a browser cache issue.
Clear your browser cache.
jacoscar
(Jacopo)
November 16, 2024, 7:31am
3
I just checked on my iPhone and it doesn’t show up
WallyR
(Wally)
November 16, 2024, 8:17am
4
Try reading this thread then.
HI,
Had a bit of a struggle understanding the notify.file myself, I thought it might be of help for others to let you in on how it works for me now.
Challenge: to forward all notifications to the text file created by notify.file,
First create the desired settings for the notify.file to work (thanks @JtotheDub77 and @Tinkerer !):
# https://home-assistant.io/components/notify.file/
- name: filed_notifications
platform: file
filename: filed_notifications.txt
timestamp: True
then, send n…
jacoscar
(Jacopo)
November 16, 2024, 8:23am
5
That thread is from 2018; I set up my working file notifications no more than 2 years ago; now something has changed again. I really need something more recent
you didnt read the last posts there obviously?
its all there
WallyR
(Wally)
November 16, 2024, 8:50am
7
Is it a long time since the last HA core update?
There were a breaking change a few months back.
Control your home with an AI powered Assist, conditional sections and cards for your dashboards, amazing new media player commands, and so much more! 🚀
jacoscar
(Jacopo)
November 16, 2024, 9:14am
8
I have now; but that’s not the problem I have. Even if I use “notify.send_message”, the entity that I defined in the yaml or through the UI (which shows as “file” rather than “filenotify”, see picture above) does not show up
I have these
sensor:
- platform: file
file_path: /config/logging/filed/filed_notifications.txt
name: Filed notifications
<<: &truncate_value
value_template: >
{% if value is not none %}
{% if value|length < 255 %} {{value}}
{% else %} Truncated: {{value|truncate(240,True, '')}}
{% endif %}
{% endif %}
for the sensor and
notify:
# https://www.home-assistant.io/integrations/file/#notifications
- name: filed_notifications
platform: file
filename: /config/logging/filed/filed_notifications.txt
# timestamp: False
for the notifications from before
resulting in the File integration overview
but, now I reread your OP: are you only having an issue with the PDC.csv? and all others work correctly?
jacoscar
(Jacopo)
November 17, 2024, 8:37am
10
Yes, all the others work correctly.
I finally figured it out
I needed to get the entity ID of the file service I created
This cannot be changed and it confusingly looks like an action name
However, the service I need to call is “Notifications: send a notification message” and then select the entity from above
So while, previously set up notifications included the target file in the action, now you have to specify the generic action and then specify the “target file”