sparkline_data

Function sparkline_data 

Source
pub fn sparkline_data(
    history: &[HistoryRecord],
    device_type: Option<DeviceType>,
) -> Vec<u64>
Expand description

Extracts primary sensor values from history records for use in a sparkline widget.

Returns CO2 for Aranet4, radon for AranetRadon, or attempts both for unknown types.

§Arguments

  • history - Slice of history records
  • device_type - Optional device type to determine which values to extract

§Returns

A Vec<u64> containing the primary sensor values. Returns an empty vector if no valid data is found.