Refactor models

This commit is contained in:
2019-08-07 18:25:56 -04:00
parent e93ec7f09a
commit 03cff3533c
4 changed files with 81 additions and 61 deletions

View File

@@ -0,0 +1,42 @@
using JetBrains.Annotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
namespace ChrisKaczor.HomeMonitor.Weather.Models
{
[PublicAPI]
public class WeatherReading
{
public DateTimeOffset Timestamp { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public WindDirection WindDirection { get; set; }
public decimal WindSpeed { get; set; }
public decimal Humidity { get; set; }
public decimal HumidityTemperature { get; set; }
public decimal Rain { get; set; }
public decimal Pressure { get; set; }
public decimal PressureTemperature { get; set; }
public decimal BatteryLevel { get; set; }
public decimal LightLevel { get; set; }
public decimal Latitude { get; set; }
public decimal Longitude { get; set; }
public decimal Altitude { get; set; }
public int SatelliteCount { get; set; }
public DateTimeOffset GpsTimestamp { get; set; }
}
}