Table of Contents

Class LockConfig

Namespace
HaMqttDiscoverable.Entities
Assembly
HaMqttDiscoverable.dll

Configuration for a LockEntity.

public sealed class LockConfig : EntityConfig
Inheritance
LockConfig
Inherited Members

Properties

CodeFormat

A regular expression Home Assistant's UI uses to validate a code before sending a command, if you require one. Not enforced by this library.

[JsonPropertyName("code_format")]
public string? CodeFormat { get; set; }

Property Value

string

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

string

PayloadLock

The payload sent to lock. Defaults to "LOCK".

[JsonPropertyName("payload_lock")]
public string PayloadLock { get; set; }

Property Value

string

PayloadOpen

The payload sent to open (e.g. a latch), if this lock supports it. Null (the default) means "open" isn't supported.

[JsonPropertyName("payload_open")]
public string? PayloadOpen { get; set; }

Property Value

string

PayloadUnlock

The payload sent to unlock. Defaults to "UNLOCK".

[JsonPropertyName("payload_unlock")]
public string PayloadUnlock { get; set; }

Property Value

string

StateJammed

The state value meaning "jammed". Defaults to "JAMMED".

[JsonPropertyName("state_jammed")]
public string StateJammed { get; set; }

Property Value

string

StateLocked

The state value meaning "locked". Defaults to "LOCKED".

[JsonPropertyName("state_locked")]
public string StateLocked { get; set; }

Property Value

string

StateLocking

The state value meaning "locking" (in progress). Defaults to "LOCKING".

[JsonPropertyName("state_locking")]
public string StateLocking { get; set; }

Property Value

string

StateOpen

The state value meaning "open". Defaults to "OPEN".

[JsonPropertyName("state_open")]
public string StateOpen { get; set; }

Property Value

string

StateOpening

The state value meaning "opening" (in progress). Defaults to "OPENING".

[JsonPropertyName("state_opening")]
public string StateOpening { get; set; }

Property Value

string

StateUnlocked

The state value meaning "unlocked". Defaults to "UNLOCKED".

[JsonPropertyName("state_unlocked")]
public string StateUnlocked { get; set; }

Property Value

string

StateUnlocking

The state value meaning "unlocking" (in progress). Defaults to "UNLOCKING".

[JsonPropertyName("state_unlocking")]
public string StateUnlocking { get; set; }

Property Value

string