koying / mqtt_discoverystream_ha

Extension of HA mqtt_statestream integration with discovery config publishing
11 stars 6 forks source link
custom-component hass home-assistant homeassistant mqtt

MQTT DiscoveryStream integration for Home Assistant

This is an "extension" of the builtin mqtt_statestream integration.
Besides the functionalities of the hereabove, it also allows to publish and handles an MQTT "discovery" setup.

Changelog

1.4

1.3

1.2

1.1

unreleased

1.0

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.3

0.1

Pre-requisites

  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

Configuration

Options

This integration can only be configuration via YAML. The base options are the same as the mqtt_statestream one.

key default required description
base_topic none yes Base topic used to generate the actual topic used to publish.
discovery_topic none no Topic where the configuration topics will be created. Defaults to base_topic
publish_attributes false no Publish attributes of the entity as well as the state.
publish_timestamps false no Publish the last_changed and last_updated timestamps for the entity.
publish_discovery false no Publish the discovery topic ("config").
include / exclude none no Configure which integrations should be included / excluded from publishing.

Credits