mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
32 lines
872 B
C#
32 lines
872 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace ChrisKaczor.HomeMonitor.Environment.Service;
|
|
|
|
public class Message
|
|
{
|
|
[JsonPropertyName("model")]
|
|
public required string Model { get; set; }
|
|
|
|
[JsonPropertyName("nickname")]
|
|
public required string Name { get; set; }
|
|
|
|
[JsonPropertyName("readings")]
|
|
public required Readings Readings { get; set; }
|
|
|
|
[JsonPropertyName("timestamp")]
|
|
public required DateTimeOffset Timestamp { get; set; }
|
|
|
|
public decimal AirQualityIndex => Readings.AirQualityIndex;
|
|
|
|
public decimal ColorTemperature => Readings.ColorTemperature;
|
|
|
|
public decimal GasResistance => Readings.GasResistance;
|
|
|
|
public decimal Humidity => Readings.Humidity;
|
|
|
|
public decimal Luminance => Readings.Luminance;
|
|
|
|
public decimal Pressure => Readings.Pressure;
|
|
|
|
public decimal Temperature => Readings.Temperature;
|
|
} |