ha-mqtt
Generate MQTT entities in Home Assistant
English | 简体中文
Reference document: https://www.home-assistant.io/integrations/mqtt#mqtt-discovery
Example:https://github.com/shaonianzhentan/node-red-contrib-ha-mqtt/wiki
Supported languages
- English (en-US)
- Chinese (zh)
Supported components
- alarm_control_panel
- binary_sensor
- button
- camera
- climate
- cover
- date (HA 2026.5+)
- datetime (HA 2026.5+)
- device_tracker
- device_automation
- event
- fan
- humidifier
- image
- infrared (HA 2026.7+)
- lawn_mower
- light
- lock
- number
- notify
- scene
- select
- sensor
- switch
- siren
- update
- tag
- text
- time (HA 2026.5+)
- vacuum
- valve
- water_heater
Auto-discovery
topic: homeassistant/status
payload: online
Home Assistant compatibility
Discovery payloads follow the current HA MQTT discovery schema, including the origin block and per-entity availability (online / offline). date, time and datetime require HA 2026.5 or newer; infrared requires HA 2026.7 or newer. Availability can be disabled for a single entity by setting "availability_topic": null in its Configuration field.
HA version selector
The device config node has a Home Assistant version dropdown. It defaults to Latest, which enables all platforms and uses current HA behavior (including remapping legacy binary sensor device classes). If you run an older HA, select the matching version:
- Discovery configs for platforms introduced in later HA versions are skipped; the affected node shows a yellow status instead of publishing a config HA cannot understand.
- Discovery attributes that only exist in newer HA versions are removed, including from hand-written JSON in the entity Configuration field.
- Legacy
binary_sensordevice class values (cool,warm,carbon_monoxide) are remapped tocold,heat,gasfrom HA 2022.9 onward; older versions keep the original value.
This is a manual setting. After upgrading HA, update the selection to enable newly supported platforms.
