From c570fbabfa6dfbcb29a1b1947180da947dd37fb4 Mon Sep 17 00:00:00 2001 From: Stefan Allius Date: Sun, 1 Oct 2023 21:29:33 +0200 Subject: [PATCH] add MQTT component configuration --- app/src/async_stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/async_stream.py b/app/src/async_stream.py index 486e341..5d3a51c 100644 --- a/app/src/async_stream.py +++ b/app/src/async_stream.py @@ -57,9 +57,9 @@ class AsyncStream(Message): if self.server_side: try: - for data_json, id in self.db.ha_confs(self.entitiy_prfx + self.node_id, self.unique_id, self.sug_area): + for data_json, component, id in self.db.ha_confs(self.entitiy_prfx + self.node_id, self.unique_id, self.sug_area): logger_mqtt.debug(f'Register: {data_json}') - await self.mqtt.publish(f"{self.discovery_prfx}sensor/{self.node_id}{id}/config", data_json) + await self.mqtt.publish(f"{self.discovery_prfx}{component}/{self.node_id}{id}/config", data_json) except Exception: logging.error(