Skip to content

ThinkingHome.DeviceModel ​

ThinkingHome.DeviceModel.Properties ​

Property Class ​

Свойство устройства (сенсор, только чтение). Закрытая иерархия, как и у способностей. При добавлении наследника обязательно зарегистрировать его в [JsonDerivedType] ниже.

csharp
public abstract record Property : System.IEquatable<ThinkingHome.DeviceModel.Properties.Property>

Inheritance System.Object → Property

Derived
↳ AirQualityProperty
↳ BatteryProperty
↳ CarbonDioxideProperty
↳ ContactProperty
↳ HumidityProperty
↳ IlluminanceProperty
↳ OccupancyProperty
↳ PressureProperty
↳ TemperatureProperty
↳ WaterLeakProperty
↳ WaterMeterProperty

Implements System.IEquatable<Property>

Properties ​

Property.Instance Property ​

Экземпляр свойства (например, "temperature", "motion").

csharp
public string Instance { get; init; }

Property Value ​

System.String

Property.Reportable Property ​

Присылает ли устройство изменения значения (push).

csharp
public bool Reportable { get; init; }

Property Value ​

System.Boolean

Property.Retrievable Property ​

Можно ли опросить текущее значение.

csharp
public bool Retrievable { get; init; }

Property Value ​

System.Boolean

Опубликовано под лицензией MIT