Why does the data being collected by the System Monitor sensor platform look like this?

Hello, I wonder if someone can be kind enough to help me understand this behaviour of the System Monitor sensor platform:

I am collecting the amount of free disc space (GiB) and percentage disc usage (%) of my Home Assistant OS system, and sending it to InfluxDB.

I have inserted the following into my configuration file:

image_2

The data coming in looks like this:

There are two things I don’t understand:

  1. On the disc_usage_percent values it seems it can only see 0.1% changes, and on the disc_free values it is 0.1 GiB. What is setting the resolution of this data, and can it be changed?

  2. The data points seems to be randomly taken in time. The docs specify that values are collected every 15 seconds, and I have tried changing it to 10 seconds using scan_interval: 10, but it doesn’t help.

Can anyone help me resolve what is going on? Is it expected behaviour?

Thank you!

  1. it is hard coded and you can’t change it.
  2. 15s is the minimum. If the value does not change then no update is sent to influxdb.

I see. Thanks for the reply.

But then I don’t understand why there can be consecutive values in the database which are identical - such as the circled ones below. If no update is sent unless there is a change, then there should never be identical consecutive values? Am I missing something silly?

Did you restart home assistant at those times?

That will force an update when the sensor goes from unknown to the restored value.

No this wasn’t the case. In fact if I intentionally perform a restart then there is no data pushed upon restart. Could there be another reason why these points come in at strange intervals?

Thank you!

I think it is something related to the values for disc_free and disc_use_percent not actually changing, because if I try adding the memory_use_percent type as well (which I know is changing all the time) then the data pushes correctly every 10 seconds as expected:

It still doesn’t explain why there are consecutive identical values though.