Notify.send_message in 2024.6

To be utterly clear (which everything about this particular update is not) as far as I can tell, the HA update automatically (if there is a notify: entry in the config file, with at least one platform: file )

  • loads in the new file integration (which you can’t do manually before the HA update as it is new in this update)
  • creates a new entry for each of the platform file notifications, with the file name as given, and the name as given, and the timestamp setting as given
notify:
  - name: tub-event
    platform: file
    filename: /share/user_data/tub/tubtimes.txt
    timestamp: true

Thus the above ends up with a new ‘entity’ as notify.file_tub_event as the id.

The auto-update does not

  • add the necessary and now required access for the file path directory - you have to do that yourself manually (hence the update automatically breaks HA and issues lots of warning messages). My suggestion is that you add these access directory paths FIRST before doing the update
  • remove the old yaml config, and you can still call the old service-entity, you will just get another warning message

And while on the subject:
If you add new entries (entities) to the file integration once you have it installed, then the integration allows to to select the ‘file notification’ service (rather than a ‘file sensor’). Then you have to provide the file path, and at this point it will complain if access has not been permitted. Hence if you have already added /share as an access directory, any new file can be set up for this directory, but if you want a new file /share/my_data/test then you will need to first add /share/my_data manually to the allowed directory list (in config yaml).
After that, you get a new entry in the config, which is a new entity. There are three ‘names’ for all of this

  • the integration entry name (which is created as ‘File [/share/my_data/file.txt]’)
  • the entity name, which is ‘File’
  • the entity id, which is ‘notify.file’

When you add more of these, the entity id becomes ‘notify.file_2’ and so on.
If you actually want to use these entities, it is necessary to go back in and edit the name and the entity id post creation to sometime more useful.

Also note, that appart from the entry name, there is no way of knowing what the file is or if timestamp is set up, so you have to test each entry entity to see what it does, and there is no way of editing any of the settings, so you will need to delete and re-create them if you want to change the file name or turn on/off the timestamp setting.

5 Likes