mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-14 01:25:38 -05:00
Light level changes
This commit is contained in:
@@ -126,15 +126,7 @@ namespace ChrisKaczor.HomeMonitor.Weather.Service.Data
|
||||
|
||||
var query = ResourceReader.GetString("ChrisKaczor.HomeMonitor.Weather.Service.Data.Resources.GetReadingValueHistoryGrouped.sql");
|
||||
|
||||
switch (weatherValueType)
|
||||
{
|
||||
case WeatherValueType.LightLevel:
|
||||
query = query.Replace("@Value", "LightLevel / 3.3 * 100");
|
||||
break;
|
||||
default:
|
||||
query = query.Replace("@Value", weatherValueType.ToString());
|
||||
break;
|
||||
}
|
||||
query = query.Replace("@Value", weatherValueType.ToString());
|
||||
|
||||
return await connection.QueryAsync<WeatherValueGrouped>(query, new { Start = start, End = end, BucketMinutes = bucketMinutes });
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ FROM (
|
||||
Humidity,
|
||||
PressureTemperature AS Temperature,
|
||||
Pressure,
|
||||
LightLevel / 3.3 * 100 AS LightLevel,
|
||||
LightLevel,
|
||||
Rain
|
||||
FROM Reading
|
||||
WHERE Timestamp BETWEEN @Start AND @End
|
||||
|
||||
Reference in New Issue
Block a user