Help with proper setup and querying of historian type data

I am testing out Influx as a database for a historian type application where I’ll be logging values of various sensors. I have the data collection side setup to log based on a deadband, so my values will be received at varying intervals based on if they are changing or not. With this, the retrieval mode I need for these would be step wise, assuming that the value is the same as the previously logged value until something different is logged.

Is this a format that Influx can work with well? I am not sure on this as functions like aggregateWindow (fn: mean) take the average of values, without any consideration of time weighting. I looked at the timeWeightedAverage function, but that uses linear interpolation which is also not correct.

Is there a better way to work with/query this type of data? Or maybe a concept I’m missing?