Namespace HaMqttDiscoverable.Entities
Classes
- AlarmControlPanel
A security alarm panel that can be armed/disarmed/triggered from Home Assistant.
- AlarmControlPanelConfig
Configuration for an AlarmControlPanel entity.
- AlarmControlPanelState
The state values Home Assistant's alarm control panel component understands, for use with PublishStateAsync(string, bool, CancellationToken).
- BinarySensor
A read-only two-state value reported to Home Assistant, e.g. a door sensor or a motion detector.
- BinarySensorConfig
Configuration for a read-only BinarySensor entity, reporting one of two states.
- Button
A stateless, momentary action exposed to Home Assistant, e.g. "Restart" or "Identify".
- ButtonConfig
Configuration for a Button entity: a stateless, momentary action.
- Camera
A live-updating image feed - publish a new frame whenever one is available and Home Assistant's camera card shows the latest one. Frames are always published base64-encoded, so this works over the same string-based MQTT publish path as every other entity in this library.
- CameraConfig
Configuration for a Camera entity: a live-updating image feed, distinct from Image which is for a single still image.
- Climate
A thermostat/HVAC device: an operating mode (one of Modes) plus a target temperature, with optional fan mode, swing mode, preset mode, humidity, a heating/cooling range, a separate power toggle, and a read-only "current action" report - enable the ones you need via the corresponding ClimateConfig flags.
- ClimateConfig
Configuration for a Climate entity: an HVAC mode plus a target temperature, with optional fan mode, swing mode, preset mode, humidity, a separate power toggle, a heating/cooling range instead of a single target, and a read-only "current action" report.
- Cover
A cover (blind, garage door, shade, awning, ...) that can be opened/closed/stopped, and optionally reports/accepts a 0-100 position and, independently, a 0-100 tilt.
- CoverConfig
Configuration for a Cover entity: a blind, garage door, shade, etc. that can be opened/closed/stopped, optionally with position and tilt.
- Date
A calendar date that can be read and set from Home Assistant, formatted as ISO 8601 ("yyyy-MM-dd").
- DateConfig
Configuration for a Date entity: a calendar date that can be read and set.
- DateTimeEntity
A combined date and time value that can be read and set from Home Assistant, formatted as ISO 8601 ("yyyy-MM-ddTHH:mm:ss"). Named
DateTimeEntityrather thanDateTimeto avoid colliding with DateTime.
- DateTimeEntityConfig
Configuration for a DateTimeEntity: a combined date and time value that can be read and set.
- DeviceTracker
A read-only presence report - "home", "away", or a custom zone name. For full GPS tracking (latitude/longitude/accuracy), publish JSON with a
json_attributes_topicyourself via the underlying HaMqttConnection; this entity covers the common home/away case.
- DeviceTrackerConfig
Configuration for a DeviceTracker entity: a read-only "home"/"away"/zone presence report.
- EntityConfig
Configuration shared by every discoverable entity type. Subclasses add the fields that are specific to their Home Assistant component (e.g.
unit_of_measurementfor sensors).
- Event
A read-only stream of discrete, named events, e.g. a doorbell's "single_press"/"double_press"/"held".
- EventConfig
Configuration for an Event entity: a read-only stream of discrete, named events (e.g. a doorbell button's "single"/"double"/"long" presses).
- Fan
A fan that can be turned on/off, and optionally has a speed percentage and/or named preset modes. Oscillation and direction (forward/reverse) control aren't exposed by this type yet - they'd follow the same auxiliary-topic pattern as SupportsPercentage support; see
HaEntity.RegisterAuxiliaryCommandTopicif you need to add them.
- FanConfig
Configuration for a Fan entity: on/off, optionally with speed (SupportsPercentage) and/or named presets (PresetModes). Oscillation and direction control aren't exposed yet - see Fan's remarks.
- HaEntity<TConfig>
Base class for every discoverable entity. Handles building the MQTT topics, publishing the Home Assistant discovery payload, publishing state, and (for entities that accept commands) subscribing to the command topic.
- Humidifier
A humidifier or dehumidifier: on/off with a target humidity, optionally with named modes (e.g. "auto", "sleep"). Set DeviceClass to "humidifier" (the default Home Assistant assumes) or "dehumidifier".
- HumidifierConfig
Configuration for a Humidifier entity: on/off with a target humidity, optionally with named modes.
- Image
A still image published for Home Assistant to display, e.g. a camera snapshot or a generated chart. Images are always published base64-encoded, so this works over the same string-based MQTT publish path as every other entity in this library.
- ImageConfig
Configuration for an Image entity: publishes a still image (e.g. a snapshot or a generated chart) for Home Assistant to display.
- LawnMower
A robot lawn mower with start/pause/dock controls and an activity report.
- LawnMowerConfig
Configuration for a LawnMower entity: start/pause/dock controls plus an activity report.
- Light
A light that can be turned on/off and, optionally, dimmed.
- LightConfig
Configuration for a Light entity. Uses Home Assistant's MQTT JSON light schema, so state and commands are exchanged as small JSON objects rather than plain strings.
- LightState
The JSON body used for both state updates and commands under Home Assistant's MQTT JSON light schema.
- LockConfig
Configuration for a LockEntity.
- LockEntity
A lock entity that can be locked/unlocked (and optionally opened) from Home Assistant.
- MediaPlayer
A media player, built from several individually-discoverable MQTT entities (a power switch, a volume number, optionally a mute switch and a source select, a handful of sensors for metadata, and transport buttons).
- MediaPlayerConfig
Configuration for a MediaPlayer. Unlike other entity configs, this isn't a single Home Assistant component - it describes the bundle of real MQTT entities (switch, number, select, sensors, buttons) that MediaPlayer creates.
- MediaPlayerPlaybackState
The playback state values Home Assistant's media player component understands, for use with PublishPlaybackStateAsync(string, CancellationToken). Matches
homeassistant.components.media_player.MediaPlayerState.
- MediaPlayerSnapshot
A partial snapshot of media player state, for use with PublishStateAsync(MediaPlayerSnapshot, CancellationToken). Only the non-null fields are published, so you can report just what changed.
- Notify
A notification target Home Assistant can send messages to (e.g. via the
notify.send_messageaction).
- NotifyConfig
Configuration for a Notify entity: a target Home Assistant can send notification messages to.
- Number
A numeric value that can be read and set from Home Assistant, e.g. a target temperature.
- NumberConfig
Configuration for a Number entity: a numeric value that can be read and set.
- Scene
A stateless scene Home Assistant can activate, e.g. "Movie Night".
- SceneConfig
Configuration for a Scene entity: a stateless trigger, like Button but grouped under Home Assistant's "scene" domain.
- Select
A value picked from a fixed list of options, e.g. an operating mode.
- SelectConfig
Configuration for a Select entity: a value picked from a fixed list of options.
- Sensor
A read-only value reported to Home Assistant, e.g. a temperature reading or a counter.
- SensorConfig
Configuration for a read-only Sensor entity.
- Siren
An on/off alarm sounder. AvailableTones, SupportDuration and SupportVolumeSet only affect what Home Assistant's UI shows - without a
command_template(which this library doesn't expose, matching its other entities), Home Assistant sends only the plain on/off payload over MQTT, so tone/duration/volume choices made in the UI aren't transmitted. If you need them, read them from the service call on the Home Assistant side via an automation, or use the raw HaMqttConnection APIs.
- SirenConfig
Configuration for a Siren entity: an on/off alarm sounder, optionally with tones.
- Switch
A simple on/off control, e.g. a relay or a smart plug.
- SwitchConfig
Configuration for a Switch entity: a simple on/off control.
- Text
A free-form string value that can be read and set from Home Assistant.
- TextConfig
Configuration for a Text entity: a free-form string value that can be read and set.
- Time
A time-of-day value that can be read and set from Home Assistant, formatted as ISO 8601 ("HH:mm:ss").
- TimeConfig
Configuration for a Time entity: a time-of-day value that can be read and set.
- Update
Reports available firmware/software updates for a device, with an optional "Install" action.
- UpdateConfig
Configuration for an Update entity: reports available firmware/software updates, with an optional "Install" action.
- UpdateState
The JSON body published to an Update entity's state topic.
- Vacuum
A robot vacuum with start/pause/stop/return-to-base/clean-spot/locate controls and an optional fan speed.
- VacuumConfig
Configuration for a Vacuum entity: a robot vacuum with start/pause/stop/return/locate controls and an optional fan speed.
- Valve
A valve that can be opened/closed (optionally stopped mid-movement), or - when ReportsPosition is set - opened to a specific 0-100 position.
- ValveConfig
Configuration for a Valve entity: open/close (optionally with a stop action), or an open-to-a-position valve.
- WaterHeater
A water heater with an operating mode plus a target/current temperature.
- WaterHeaterConfig
Configuration for a WaterHeater entity: an operating mode plus a target/current temperature.
Enums
- AlarmControlPanelCommand
The commands Home Assistant can send to an AlarmControlPanel.
- CoverCommand
The commands Home Assistant can send to a Cover.
- CoverState
The states a Cover can publish.
- HvacAction
What a Climate device is actually doing right now, for use with PublishActionAsync(HvacAction, bool, CancellationToken).
- LawnMowerActivity
The activity values Home Assistant's lawn mower component understands, for use with PublishStateAsync(LawnMowerActivity, bool, CancellationToken).
- LockCommand
The commands Home Assistant can send to a LockEntity.
- LockState
The possible states of a LockEntity, for use with PublishStateAsync(LockState, bool, CancellationToken).
- VacuumActivity
The activity values Home Assistant's vacuum component understands, for use with PublishStateAsync(VacuumActivity, string?, IReadOnlyDictionary<string, object?>?, bool, CancellationToken).
- VacuumCommand
The commands Home Assistant can send to a Vacuum.
- ValveCommand
The commands Home Assistant can send to a Valve that doesn't report a position.
- ValveState
The states a non-position-reporting Valve can publish.