home-assistant.io/source/_components/mqtt_statestream.markdown

1.2 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release, ha_iot_class
layout title description date sidebar comments sharing footer logo ha_category ha_release ha_iot_class
page MQTT Statestream Instructions how to setup MQTT Statestream within Home Assistant. 2017-09-11 08:00 true false true true mqtt.png Other 0.54 depends

The mqtt_statestream component publishes state changes in Home Assistant to individual MQTT topics.

To enable MQTT Statestream in Home Assistant, add the following section to your configuration.yaml file:

# Example configuration.yaml entry
mqtt_statestream:
  base_topic: homeassistant

Configuration variables:

  • base_topic (Required): Base topic used to generate the actual topic used to publish.

Operation

When any Home Assistant entity changes, this component will publish that change to MQTT.

The topic for each entity is different, so you can easily subscribe other systems to just the entities you are interested in. The topic will be in the form base_topic/domain/entity/state.

For example, with the example configuration above, if an entity called 'light.master_bedroom_dimmer' is turned on, this component will publish on to homeassistant/light/master_bedroom_dimmer/state.