mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Fix light level query
This commit is contained in:
@@ -115,7 +115,15 @@ 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 / BatteryLevel");
|
||||
break;
|
||||
default:
|
||||
query = query.Replace("@Value", weatherValueType.ToString());
|
||||
break;
|
||||
}
|
||||
|
||||
return await connection.QueryAsync<WeatherValueGrouped>(query, new { Start = start, End = end, BucketMinutes = bucketMinutes });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user