The filesize sensor is for displaying the size in MB of a file

I would like to have an option to display in KB and Bites not just MB
For instance to monitor changes to configuration.yaml.

According to code, you have a specific sensor named “Size bytes” with the size in bytes.

Another option is to use a template sensor which converts the unit of measurement.

I think the best option is to use the attribute displaying it as bytes which is already there.

I didn’t pay attention: This is true for the next HA version…
Subsequently, the “byte” attribute will go away from the main sensor (breaking change)