mirror of
https://github.com/excaliburpartners/OmniLinkBridge
synced 2024-12-23 03:02:24 +00:00
28 lines
774 B
C#
28 lines
774 B
C#
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
namespace OmniLinkBridge.MQTT
|
|
{
|
|
public class Sensor : Device
|
|
{
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public enum DeviceClass
|
|
{
|
|
humidity,
|
|
temperature
|
|
}
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
public DeviceClass? device_class { get; set; }
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
public string icon { get; set; }
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
public string unit_of_measurement { get; set; }
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
public string value_template { get; set; }
|
|
}
|
|
}
|