MQTT more logging #522

This commit is contained in:
Jokob-sk
2024-01-05 18:42:32 +11:00
parent d7ba540377
commit d992edf6b4
2 changed files with 12 additions and 1 deletions

View File

@@ -47,6 +47,11 @@ client = None # mqtt client
def main():
mylog('debug', [f"[{pluginName}] DEBUG TEST"])
mylog('verbose', [f"[{pluginName}] VERBOSE TEST"])
mylog('minimal', [f"[{pluginName}] MINIMAL TEST"])
mylog('none', [f"[{pluginName}] NONE TEST"])
mylog('verbose', [f'[{pluginName}](publisher) In script'])
# Check if basic config settings supplied
@@ -132,6 +137,12 @@ class sensor_config:
def publish_mqtt(client, topic, message):
status = 1
mylog('verbose', [f"[{pluginName}] Sending MQTT topic: {topic}"])
mylog('verbose', [f"[{pluginName}] Sending MQTT message: {message}"])
while status != 0:
result = client.publish(
topic=topic,

View File

@@ -395,7 +395,7 @@
{
"function": "dev_NewDevice",
"type": "integer.checkbox",
"default_value": true,
"default_value": 1,
"options": [],
"localized": ["name", "description"],
"name": [