Table of Contents

Class EventConfig

Namespace
HaMqttDiscoverable.Entities
Assembly
HaMqttDiscoverable.dll

Configuration for an Event entity: a read-only stream of discrete, named events (e.g. a doorbell button's "single"/"double"/"long" presses).

public sealed class EventConfig : EntityConfig
Inheritance
EventConfig
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

string

EventTypes

The set of event types this entity can report. Required - Home Assistant rejects any event type not listed here.

[JsonPropertyName("event_types")]
public List<string> EventTypes { get; set; }

Property Value

List<string>