Use txt file value in home assistant. As Sensor?

Hi guys.
In my homeassistant I have a .txt file. I would like to use the value, but i can not define it as a sensor.

I can open the .txt. and it is 16.8 but I can not find it in entitys


  themes: !include_dir_merge_named themes
  - platform: file
    name: dateisensor
    file_path: result.txt

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


The notify services for the file integration now require that the file path is an allowed path. You should check the accessed file is in the allowlist_external_dirs to ensure your automations keep working.

(@jbouwh - #116861) (documentation)

Try to setup by the ui, Settings, devices, add integration, file

I think I am already doing it like this but the “dateisensor” does not appear

change configuration.yaml > restart > anything else?

and allowlist_external_dirs is done as well

Where in the above document does it ask you to do that (apart from the allowlist)? I suspect you’ve pulled that code from an out-of-date forum post or so-called “tutorial”.

Edit: to be fair, the update to UI configuration is new with 2024.6:

Nothing in the logs, an error or something?

You are not using the yaml code that you posted, right?

No I am trying an other way now. I will let you know if it works

The other idea: write entitys via python post request.

Completly different idea