Only support the run_topic logic on the MQTT plugin.

Plugins that extend `MqttPlugin` shouldn't run messages as
requests, even if the parent MQTT plugin is configured to
do so.
This commit is contained in:
Fabio Manganiello 2023-09-14 01:09:03 +02:00
parent 4cb5aa7acb
commit 5a514fdcce
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -137,7 +137,7 @@ class MqttPlugin(RunnablePlugin):
self.client_id = client_id or str(Config.get('device_id'))
self.run_topic = (
f'{run_topic_prefix}/{Config.get("device_id")}'
if run_topic_prefix
if type(self) == MqttPlugin and run_topic_prefix
else None
)