So, nomeassistant is on top, put it under there, two spaces more indented.
We’re getting closer:
homeassistant:
external_url: "https://bq7qvbi................ redacted .......................u.casa:8123"
internal_url: "http://home.local:8123"
allowlist_external_dirs:
- "/config"
Mostly successful- my automation that writes the sensor data to a text file is working again.
Now when I restart Home Assistant I get a repair notification:
The File notify.notify service is migrated, but it seems the old notify service is still being used.
A new notify entity is available now to replace each legacy notify service.
Update any automations or scripts to use the new notify.send_message service exposed with this new entity. When this is done, select Submit and restart Home Assistant.
But, I can’t find any documentation for using the notify entity to write to a text file.
Should I continue on this thread or start a new one because you solved the initial issue?
If i was to decide, you continue here. ( But mark Edwin’s post as solution )
Partly there is a few post already out there, and as you state, The Documentation of this New(Ongoing) “Integration” is atleast confusing/Spread
Below is 1 link found in another Topic
However it’s not the last we see/hear from this
New notify entity platform | Home Assistant Developer Docs.
EDIT: It seems like the Documentation of this “Notify” is going to be “Spread” in the Various “Platforms” supporting this “Notify” Service, which to me seems “Odd” , Not to mention that the "
allowlist_external_X
Is to be found elsewhere
Don’t use that. It could be anything.
https://www.home-assistant.io/integrations/notify/#notify-entity-service
Use the service shown in the docs:
notify.send_message
There are examples here: https://www.home-assistant.io/integrations/notify/#example-with-the-entity-platform-notify-service
So:
action:
- service: notify.send_message
target:
- entity_id: # your file notification entity here
data:
message: "Your message."
Yes, i also came to the same conclusion, after reading Integrations/ Notify , Integrations/Notifications, Integrations /homeassistant (the allow_list )
This would be ok, if there would just be links in the various places, so there atleast is some kind “red tread/coherent context” , right now it’s not easy to get a grip of it
This is the basic structure of the documentation that a lot of people do not understand. Domains have their own documentation pages (Light, Cover, Notify, Media Player, etc…) that list the services so that they do not have to be repeated on all the other device specific pages. e.g.
These domain pages are searchable in the integrations index.
I might write a short community guide about using the documentation for core integrations at some stage.
Yes i use to just click the “Integration” url in top-bar, easy way into documentation, when im sitting with something new, or " forgot what i did last summer "
Anyways, i change most of my “Messages” to short TTS, so i don’t have to “pick up the phone” , it’s mostly for Warnings/Attention purposes
Thanks for the tip…
So as I read the docs, in dev tools → services, this should put the text into the file “notify.txt” in the config folder.
service: notify.send_message
target:
entity_id: "test.txt"
data: {
message: "This is a test"
}
The test.txt file is not in /config. Where is it? Or is the example wrong?
service: notify.send_message
target:
entity_id: "test.txt" # this is not a notify entity.
data: { # what is this?
message: "This is a test"
} # what is this?
- service: notify.send_message
target:
entity_id: notify.something # look in Dev Tools -> States
data:
message: "This is a test"
I never claimed to understand YAML.
This runs. No errors, and no file:
service: notify.send_message
target:
entity_id: "test.txt"
data:
message: "This is a test"
OH. You mean the “file notification entity”?
How do I make a file notification entity? I already have this in my configuration.yaml:
notify:
- name: notify
platform: file
timestamp: true
filename: notify.txt
But this makes a notify.notify entity that the repair message is warning me of. The examples in the docs demonstrate notification messages to an SMS, an eMail, a DM or Chat, or a screen message. But not to a text file.
Change that to:
notify:
- name: Text File
platform: file
timestamp: true
filename: notify.txt
Then your entity id will be notify.text_file
.
Calling it “notify” will give you notify.notify
which as explained above is a special case you should not use.
Thanks, it’s making more sense now.
And, still confusing.
Here are the changes to my configuration.yaml:
#notify:
# - name: notify
# platform: file
# timestamp: true
# filename: notify.txt
notify:
- name: Text File
platform: file
filename: notify.txt
timestamp: true
I restart Home Assistant and in developer tools → states, there is still a notify.notify, and no notify.text_file.
I just set up one from the UI. It created notify.file
. There was no option for a name.
Then I set this up in yaml:
notify:
- name: Text File
platform: file
filename: test.txt
timestamp: true
It created: notify.text_file
however it also warned that YAML configuration is being removed:
There always will be if you have one or more notification integrations set up. As Above it is a special notifier:
Did you restart HA?
Wait, are you saying there’s no way to give the entity a name using the new UI? That seems to me to be a pretty important feature, not one which can simply be abandoned. Am I missing something here?
It’s new. Hopefully it will be added before the YAML is depreciated.
Thanks- I understand now why there will always be a notify.notify if I use any notify service.
I restart Home Assistant after every change to configuration.yaml.
notify:
- name: TextFile
platform: file
filename: notify.txt
timestamp: true
When I look in developer tools → states, there is no notify.textfile and no file integration warning.
So, what am I missing that I can’t create the entity?
Because the file notify moved to the UI, so you can’t create one any more in yaml ?
For now at least, you just have to rename it through the Entity’s UI Settings menu.