@ -3,18 +3,26 @@ using System.Collections.Generic;
namespacehass_workstation_service.Communication
{
public class AutoDiscoveryConfigModel
publicabstract class DiscoveryConfigModel
{
/// <summary>
/// (Optional) The MQTT topic subscribed to receive availability (online/offline) updates.
/// (Optional) Information about the device this sensor is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set.
/// </summary>
/// <value></value>
publicstringAvailability_topic{get;set;}
publicDeviceConfigModelDevice{get;set;}
/// <summary>
/// (Optional) Information about the device this sensor is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set.
/// (Optional) The name of the MQTT sensor. Defaults to MQTT Sensor in hass.
/// (Optional) The MQTT topic subscribed to receive availability (online/offline) updates.
/// </summary>
/// <value></value>
publicstringAvailability_topic{get;set;}
/// <summary>
/// (Optional) The type/class of the sensor to set the icon in the frontend. See https://www.home-assistant.io/integrations/sensor/#device-class for options.
/// (Optional) The MQTT topic subscribed to receive availability (online/offline) updates.
/// </summary>
/// <value></value>
publicstringAvailability_topic{get;set;}
/// <summary>
/// (Optional) The MQTT topic to set the command
/// </summary>
/// <value></value>
publicstringCommand_topic{get;set;}
/// <summary>
/// (Optional) The type/class of the sensor to set the icon in the frontend. See https://www.home-assistant.io/integrations/sensor/#device-class for options.
/// </summary>
/// <value></value>
publicstringDevice_class{get;set;}
/// <summary>
/// (Optional) Defines the number of seconds after the sensor’s state expires, if it’s not updated. After expiry, the sensor’s state becomes unavailable. Defaults to 0 in hass.
/// </summary>
/// <value></value>
publicint?Expire_after{get;set;}
/// <summary>
/// Sends update events even if the value hasn’t changed. Useful if you want to have meaningful value graphs in history.
/// </summary>
/// <value></value>
publicbool?Force_update{get;set;}
/// <summary>
/// (Optional) The icon for the sensor.
/// </summary>
/// <value></value>
publicstringIcon{get;set;}
/// <summary>
/// (Optional) Defines a template to extract the JSON dictionary from messages received on the json_attributes_topic.
/// </summary>
/// <value></value>
publicstringJson_attributes_template{get;set;}
/// <summary>
/// (Optional) The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Implies force_update of the current sensor state when a message is received on this topic.
/// </summary>
/// <value></value>
publicstringJson_attributes_topic{get;set;}
/// <summary>
/// (Optional) The payload that represents the available state.
/// </summary>
/// <value></value>
publicstringPayload_available{get;set;}
/// <summary>
/// (Optional) The payload that represents the unavailable state.
/// </summary>
/// <value></value>
publicstringPayload_not_available{get;set;}
/// <summary>
/// (Optional) The maximum QoS level of the state topic.
/// </summary>
/// <value></value>
publicint?Qos{get;set;}
/// <summary>
/// The MQTT topic subscribed to receive sensor values.
/// </summary>
/// <value></value>
publicstringState_topic{get;set;}
/// <summary>
/// (Optional) An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception.
/// </summary>
/// <value></value>
publicstringUnique_id{get;set;}
/// <summary>
/// (Optional) Defines a template to extract the value.
/// </summary>
/// <value></value>
publicstringValue_template{get;set;}
}
/// <summary>
/// This information will be used when announcing this device on the mqtt topic
publicCurrentClockSpeedSensor(MqttPublisherpublisher,int?updateInterval=null,stringname="CurrentClockSpeed",Guidid=default(Guid)):base(publisher,"SELECT CurrentClockSpeed FROM Win32_Processor",updateInterval??10,name??"CurrentClockSpeed",id){}