mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 03:19:34 +00:00
mqtt_statestream: Update to append 'state' to topic for future use with mqtt discovery (#9446)
This commit is contained in:
committed by
Paulus Schoutsen
parent
a7bce5f9e6
commit
04bed51277
@@ -38,7 +38,7 @@ def async_setup(hass, config):
|
||||
return
|
||||
payload = new_state.state
|
||||
|
||||
topic = base_topic + entity_id.replace('.', '/')
|
||||
topic = base_topic + entity_id.replace('.', '/') + '/state'
|
||||
hass.components.mqtt.async_publish(topic, payload, 1, True)
|
||||
|
||||
async_track_state_change(hass, MATCH_ALL, _state_publisher)
|
||||
|
||||
Reference in New Issue
Block a user