npm.io
1.4.0 • Published 8h ago

node-red-contrib-ha-mqtt

Licence
ISC
Version
1.4.0
Deps
2
Size
276 kB
Vulns
0
Weekly
0
Stars
47

ha-mqtt

Generate MQTT entities in Home Assistant

platform home-assistant NPM version

visit forks stars license

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

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_sensor device class values (cool, warm, carbon_monoxide) are remapped to cold, heat, gas from 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.

If this project is helpful to you, please donate a cup of coffee milk tea

https://paypal.me/shaonianzhentan

Reference Projects

Keywords