Where does notify.notify put files?

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."
1 Like

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.

4 Likes

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 " :slight_smile:

Anyways, i change most of my “Messages” to short TTS, so i don’t have to “pick up the phone” :slight_smile: , it’s mostly for Warnings/Attention purposes

2 posts were merged into an existing topic: Home Assistant Cookbook - Discussion Thread

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:

Screenshot 2024-06-16 at 17-25-53 Settings – Home Assistant

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.

1 Like

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 ?

You’ve got six months before that happens Francis.

What core version are you running?

For now at least, you just have to rename it through the Entity’s UI Settings menu.

2 Likes
  • Core 2024.6.2
  • Supervisor 2024.06.0
  • Operating System 12.3
  • Frontend 20240610.0

Then you should be seeing the warning in the log if you are successfully creating the file notify integration. Where are you putting this?