Revert change to MQTT discovery_hash introduced in #18169 (#18763)

This commit is contained in:
emontnemery authored and Paulus Schoutsen committed 2018-11-30 17:53:03 +01:00
1 parent 440614dd9d
commit 449cde5396
2 files changed
+2 -38

No files matched your search

+2 -5
View File
@@ -208,11 +208,8 @@ async def async_start(hass: HomeAssistantType, discovery_topic, hass_config,
if value[-1] == TOPIC_BASE and key.endswith('_topic'):
payload[key] = "{}{}".format(value[:-1], base)
# If present, unique_id is used as the discovered object id. Otherwise,
# if present, the node_id will be included in the discovered object id
discovery_id = payload.get(
'unique_id', ' '.join(
(node_id, object_id)) if node_id else object_id)
# If present, the node_id will be included in the discovered object id
discovery_id = ' '.join((node_id, object_id)) if node_id else object_id
discovery_hash = (component, discovery_id)
if payload: