Scan_interval for "file" sensor not possible? Please help!

Hello everyone! :slight_smile:

I hope you can help me. I just created a sensors.yaml file and included it in the configuration.yaml to create a “file” sensor that reads a changing value from a text file. This text file is updated approximately every 250ms. To have at least a sampling rate of 1 second, I set the scan_interval to 1.

After restarting Home Assistant, I was shocked to find out that this type of configuration is no longer allowed and has been moved to the GUI. I am asked to delete the YAML config.

Unfortunately, the most important part, the scan_interval, was not carried over and was reset to 30 seconds. How can I change it back to 1 second? I can’t find any way to do this in the GUI…

grafik

You’ll need to use an automation, using a time_pattern trigger, and have it call homeassistant.update_entity on the sensor.

1 Like
1 Like