Class TextConfig
- Namespace
- HaMqttDiscoverable.Entities
- Assembly
- HaMqttDiscoverable.dll
Configuration for a Text entity: a free-form string value that can be read and set.
public sealed class TextConfig : EntityConfig
- Inheritance
-
TextConfig
- Inherited Members
Properties
Component
The MQTT component Home Assistant should treat this entity as, e.g. sensor or
switch. Used to build the discovery topic; not part of the discovery payload itself.
public override string Component { get; }
Property Value
Max
The maximum length of the text. Defaults to 255.
[JsonPropertyName("max")]
public int? Max { get; set; }
Property Value
- int?
Min
The minimum length of the text. Defaults to 0.
[JsonPropertyName("min")]
public int? Min { get; set; }
Property Value
- int?
Mode
How the field should be displayed: "text" (default) or "password".
[JsonPropertyName("mode")]
public string? Mode { get; set; }
Property Value
Pattern
A regular expression the value must match.
[JsonPropertyName("pattern")]
public string? Pattern { get; set; }