mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-02-16 10:58:32 -05:00
Fix temperature aggregate
This commit is contained in:
@@ -2,9 +2,10 @@ SELECT Timestamp,
|
|||||||
WindDirection,
|
WindDirection,
|
||||||
WindSpeed,
|
WindSpeed,
|
||||||
Humidity,
|
Humidity,
|
||||||
|
HumidityTemperature,
|
||||||
Rain,
|
Rain,
|
||||||
Pressure,
|
Pressure,
|
||||||
PressureTemperature AS Temperature,
|
PressureTemperature,
|
||||||
LightLevel,
|
LightLevel,
|
||||||
Latitude,
|
Latitude,
|
||||||
Longitude,
|
Longitude,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace ChrisKaczor.HomeMonitor.Weather.Service.Models
|
|||||||
|
|
||||||
public decimal RainTotal { get; set; }
|
public decimal RainTotal { get; set; }
|
||||||
|
|
||||||
private readonly static List<int> _windDirectionValues = ((WindDirection[])Enum.GetValues(typeof(WindDirection))).Select(e => (int)e).ToList();
|
private static readonly List<int> _windDirectionValues = ((WindDirection[])Enum.GetValues(typeof(WindDirection))).Select(e => (int)e).ToList();
|
||||||
|
|
||||||
public WeatherAggregate(IEnumerable<WeatherReading> readings)
|
public WeatherAggregate(IEnumerable<WeatherReading> readings)
|
||||||
{
|
{
|
||||||
@@ -32,7 +32,7 @@ namespace ChrisKaczor.HomeMonitor.Weather.Service.Models
|
|||||||
|
|
||||||
Humidity = new ReadingAggregate(readings, r => r.Humidity, 1);
|
Humidity = new ReadingAggregate(readings, r => r.Humidity, 1);
|
||||||
|
|
||||||
Temperature = new ReadingAggregate(readings, r => r.PressureTemperature, 1);
|
Temperature = new ReadingAggregate(readings, r => r.HumidityTemperature, 1);
|
||||||
|
|
||||||
Pressure = new ReadingAggregate(readings, r => r.Pressure, 2);
|
Pressure = new ReadingAggregate(readings, r => r.Pressure, 2);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user