Skip to content

Home Assistant Binding ​

Devices that use Home Assistant MQTT Discovery are automatically configured with this binding. Components that share a common device.identifiers will automatically be grouped together as a single Thing. Each component will be represented as a Channel Group, with the attributes of that component being individual channels.

Discovery ​

Any device that publishes the component configuration under the homeassistant prefix in MQTT will have their components automatically discovered and added to the Inbox. You can also manually create a Thing, and provide the individual component topics, as well as a different discovery prefix. Device Discovery is supported as well.

Example ​

Things file ​

dsl

Bridge mqtt:broker:mybroker [ host="192.168.1.10", secure=false ] {
    // 1) Single component configuration; channels won't be created until config is received from the MQTT broker
    Thing homeassistant:device:kitchen_button [ topics="button/kitchen_button/restart" ]

    // 2) Device-level configuration topic; channels won't be created until config is received from the MQTT broker
    Thing homeassistant:device:kitchen_device [ topics="device/kitchen" ]

    // 3) Device-level configuration with full JSON in deviceConfig
    // Channels are restored from deviceConfig immediately, so the Thing is usable
    // even before the retained MQTT discovery message is received from the broker.
    Thing homeassistant:device:kitchen_cached [ topics="device/kitchen", deviceConfig="{\"dev\":{\"ids\":\"ea334450945afc\",\"name\":\"Kitchen\"},\"o\":{\"name\":\"bla2mqtt\",\"sw\":\"2.1\"},\"cmps\":{\"temperature\":{\"p\":\"sensor\",\"device_class\":\"temperature\",\"unit_of_measurement\":\"°C\",\"value_template\":\"{{ value_json.temperature}}\",\"unique_id\":\"temp01ae_t\"},\"humidity\":{\"p\":\"sensor\",\"device_class\":\"humidity\",\"unit_of_measurement\":\"%\",\"value_template\":\"{{ value_json.humidity}}\",\"unique_id\":\"temp01ae_h\"}},\"state_topic\":\"sensorKitchen/state\",\"qos\":2}" ]
}

Supported Components and Channels ​

The following components (and their associated channels) are supported. If a component has multiple channels, they are put together in a channel group with the component's ID. If a component only has a single channel, that channel is renamed with the component's ID, and placed directly on the Thing, without a group.
Note that most channels are optional, and may not be present.
Note also that just because these tables show that a channel may be read/write, full functionality is dependent on the device.

Alarm Control Panel ​

Channel IDTypeR/WDescription
stateStringR/WThe current state of the alarm system, and the ability to change its state. Inspect the state and command descriptions for values supported by your device. Possible values are ARM_AWAY, ARM_CUSTOM_BYPASS, ARM_HOME, ARM_NIGHT, ARM_VACATION, DISARM, TRIGGER for commands; armed_away, armed_custom_bypass, armed_home, armed_night, armed_vacation, arming, disarmed, disarming, pending, triggered for states.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Binary Sensor ​

Channel IDTypeR/WDescription
sensorSwitchROThe current state of the sensor (on/off). See Home Assistant documentation for how to interpret the value for specific device classes.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Button ​

Channel IDTypeR/WDescription
buttonStringWOSend PRESS to activate the button.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Camera
​

Base64 encoding is not supported.

Channel IDTypeR/WDescription
cameraImageROThe latest image received.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Climate ​

Channel IDTypeR/WDescription
actionStringROThe current operating state of the HVAC device.
current-temperatureNumberROThe current temperature.
fan-modeStringR/WThe desired fan speed. Inspect the state description for allowed values.
current-humidityNumber:DimensionlessROThe current relative humidity.
target-humidityNumber:DimensionlessROThe desired relative humidity.
modeStringR/WThe desired operating mode. Inspect the state description for allowed values.
preset-modeStringR/WThe current preset mode (such as eco, away, boost, comfort, home, or sleep.)
swingStringR/WThe desired swing mode. Inspect the state description for allowed values.
temperatureNumberR/WThe desired temperature.
temperature-highNumberR/WThe desired maximum temperature.
temperature-lowNumberR/WThe desired minimum temperature.
powerSwitchWOUse to turn the HVAC on or off, regardless of mode.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Cover ​

Channel IDTypeR/WDescription
coverRollershutterR/WStatus and control of the cover, possibly including its current position.
stateStringROThe current state of the cover, possibly including opening, closing, or stopped.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Device Tracker ​

Channel IDTypeR/WDescription
homeSwitchROIf the tracker reports itself as home or not home.
location-nameStringROThe arbitrary location the tracker reports itself as at (can often be "home" or "not_home").
locationLocationROThe GPS location, if the tracker can report it.
gps-accuracyNumber:LengthROThe accuracy of a GPS fix. Even if a tracker can provide GPS location, it may not be able to determine and/or report its accuracy.
source-typeStringROThe source of the data, if the tracker reports it. May be "gps", "router", "bluetooth", or "bluetooth_le".
json-attributesStringROAdditional attributes, as a serialized JSON string.

Device Trigger ​

If a device has multiple device triggers for the same subtype (the particular button), they will only show up as a single channel, and all events for that button will be delivered to that channel.

Channel IDTypeR/WDescription
{the subtype from the component}TriggerN/AA trigger channel that receives triggers (typically button presses) from the device.

Event ​

Channel IDTypeR/WDescription
event-typeTriggerN/AThe event type (e.g. a particular scene being triggered).
json-attributesTriggerN/AAdditional attributes, as a serialized JSON string.

Fan ​

Channel IDTypeR/WDescription
switchSwitchR/WOnly one of switch or speed will be present.
speedDimmerR/WOnly one of switch or speed will be present.
preset-modeStringR/WInspect the state description for valid values.
oscillationSwitchR/WIf the fan itself is oscillating, in addition to blowing.
directionStringR/Wforward or backward.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Humidifier ​

Channel IDTypeR/WDescription
stateSwitchR/WIf the humidifier should be on or off.
actionStringROWhat the humidifier is actively doing. One of off, humidifying, drying, or idle.
modeStringR/WInspect the state description for valid values.
current-humidityNumber:DimensionlessROThe current detected relative humidity, in %.
target-humidityNumber:DimensionlessR/WThe desired relative humidity, in %.
device-classStringROhumidifier or dehumidifier
json-attributesStringROAdditional attributes, as a serialized JSON string.

Light ​

Channel IDTypeR/WDescription
switchSwitchR/WOnly one of switch, brightness, or color will be present.
brightnessDimmerR/WOnly one of switch, brightness, or color will be present.
colorColorR/WOnly one of switch, brightness, or color will be present.
color-modeStringROThe current color mode
color-tempNumberR/WThe color temperature (in mired)
effectStringR/WInspect the state description to see possible effects.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Lock ​

Channel IDTypeR/WDescription
lockSwitchR/WLocked/unlocked state.
stateStringR/WAdditional states may be supported such as jammed, or opening the door directly. Inspect the state and command descriptions for values supported by your device. Possible values are LOCK, UNLOCK, OPEN for commands; JAMMED, LOCKED, LOCKING, UNLOCKED, UNLOCKING for states.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Number ​

Recognized units of measurement provide a dimension and unit hint for creating linked Items.

Channel IDTypeR/WDescription
numberNumberR/W
json-attributesStringROAdditional attributes, as a serialized JSON string.

Scene ​

If a device has multiple scenes, they will only show up as a single channel. You send the name of a given scene to activate it.

Channel IDTypeR/WDescription
sceneStringWOTriggers a scene on the device. Inspect the command description for the proper string to send.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Select ​

Channel IDTypeR/WDescription
selectStringR/WThe value for the component. Inspect the state description for all possible values.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Sensor ​

Numeric sensors with recognized units of measurement provide a dimension and unit hint for creating linked Items.

Channel IDTypeR/WDescription
sensorNumber/String/TriggerROThe value from the sensor.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Switch ​

Channel IDTypeR/WDescription
switchSwitchR/WIf the device is on or off.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Tag Scanner ​

Channel IDTypeR/WDescription
tagTriggerN/AThe value of the "scanned" tag.

Text ​

Channel IDTypeR/WDescription
textStringR/WThe text to display on the device.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Update
​

This is a special component, that will show up as additional properties on the Thing, and add a button on the Thing to initiate an OTA update. The json-attributes channel for this component will always appear as part of channel group, and not be renamed to match the component itself.

Channel IDTypeR/WDescription
json-attributesStringROAdditional attributes, as a serialized JSON string.

Vacuum ​

Channel IDTypeR/WDescription
commandStringWOSend a command to the vacuum. Inspect the command description for values supported by your device. Possible values are clean_spot, locate, pause, return_to_base, start, and stop.
fan-speedStringR/WSet the fan speed. Inspect the state description for allowed values.
custom-commandStringWOSend an arbitrary command to the vacuum. This may be a raw command, or JSON.
battery-levelDimmerROThe vacuum's battery level.
stateStringROThe state of the vacuum. One of cleaning, docked, paused, idle, returning, or error.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Valve ​

Channel IDTypeR/WDescription
valveSwitch/DimmerR/WIf the valve is on (open), or not. For a valve with position (a Dimmer), 100% is fully open.
stateStringROAdditional states may be supported, such as currently processing actions, or stopping the valve where it currently is. Inspect the state and command descriptions for values supported by your device. Possible values are CLOSE, OPEN, STOP for commands; open, opening, closed, closing for states.
json-attributesStringROAdditional attributes, as a serialized JSON string.

Supported Devices ​

See the Home Assistant documentation for a broad list of devices that should be supported by this binding. It's not feasible to test every component from every device, so there may be issues with specific devices. Please report an issue on GitHub if you find a device that is not working as expected, and not otherwise noted as a limitation above.

ESPHome ​

Configure your device to connect to MQTT as described in the documentation, and make sure discovery is not set to false. Assuming you're not running Home Assistant in parallel, you should also remove any api: block in your configuration.

Tasmota ​

To activate Home Assistant discovery support on your Tasmota device you need to do the following:

  • Configuration → MQTT: You must have unique Client name and Topic (should be the default).
  • Configuration → Other: The Device Name will be used to identify the newly found device. And you need to enable MQTT, of course.
  • Console: Enter SetOption19 1.

Your Tasmota device should now show up in your inbox.