Picks the data_formats value that matches a calibrated channel's unit.
Keeps format when its sensor type offers unit, or when format is not a known
type (a custom value from KV is left alone). Otherwise returns the first sensor type
that offers unit, or format unchanged when none does.
Picks the
data_formatsvalue that matches a calibrated channel's unit.Keeps
formatwhen its sensor type offersunit, or whenformatis not a known type (a custom value from KV is left alone). Otherwise returns the first sensor type that offersunit, orformatunchanged when none does.