INNER CODE UNIT · Python
start_control_bg
bkbilly/lnxlink · lnxlink/__main__.py:433
def start_control_bg(self, addon, topic, service, message):
"""Starts the start_control method of a module in the background"""
try:
result = addon.start_control(service, message)
if result is not None:
result_topic = (
f"{self.config['pref_topic']}/command_result/{topic.strip('/')}"
)
self.mqtt.publish(result_topic, result)
except Exception as err:
logger.error(
"Couldn't run command for module %s: %s, %s",
addon,
err,
traceback.format_exc(),
)
def setup_discovery(self, filter_name=None):