MQTT DiscoveryStream integration

This is an “extension” (and compatible replacement) of the builtin mqtt_statestream integration.
Besides the functionalities of the here-above, it also allows to publish and handles an MQTT “disvovery” setup.

This is specifically useful in “Master-Slave” HA scenarios.

  • A “slave”, by instance a specific HA instance handling zigbee and / or Bluetooth, would use this component to publish states and discovery via MQTT.
  • A “master” would use the built-in MQTT discovery mechanism to subscribe to state topics, and get commands (e.g. turn on light) information

Changelog

0.5

  • Add device support
  • FIX color support
  • Add availability support

0.4

  • Add device_tracker
  • Add light transitions
  • Initial HACS release

0.3

  • Manage color temperature

0.3

  • Fix binary_sensors

0.1

  • Initial release:
    Handles:
    • sensors
    • switches
    • lights (partial)

Pre-requistes

  1. MQTT configured

Installation

HACS

  1. Launch HACS
  2. Navigate to the Integrations section
  3. “+ Explore & Add Repositories” button in the bottom-right
  4. Search for “MQTT DiscoveryStream”
  5. Select “Install this repository”
  6. Restart Home Assistant

Home Assistant

The integration is configured via YAML only.

Example:

mqtt_discoverystream:
  base_topic: test_HA
  publish_attributes: false
  publish_timestamps: true
  publish_discovery: true
  include:
    entities:
      - sensor.owm_hourly_humidity
      - sensor.jellyfin_cloud
      - light.wled_esp
  exclude:
    entities:
      - sensor.plug_xiaomi_1_electrical_measurement

Repository

3 Likes

Does this handle wildcarded entities in the include: and exclude: sections ?

It has exactly the same way of working as mqtt_statestream, on which this is based.

Ahh yes - domains will be fine for my needs - seems to be working well.

I missed the significance of this … very nice