MQTT, INSTALL scripts work⤵

This commit is contained in:
Jokob-sk
2023-10-17 07:38:49 +11:00
parent 1b9d4223c5
commit 9dd456bd2c
5 changed files with 31 additions and 12 deletions

View File

@@ -100,9 +100,16 @@ class sensor_config:
plugObj = getPluginObject({"Plugin":"MQTT", "Watched_Value3":hash_value})
mylog('verbose', [f"[{pluginName}] Previous plugin object entry: {json.dumps(plugObj)}"])
# mylog('verbose', [f"[{pluginName}] Previous plugin object entry: {json.dumps(plugObj)}"])
if plugObj == {}:
self.isNew = True
mylog('verbose', [f"[{pluginName}] New sensor entry mac : {mac}"])
mylog('verbose', [f"[{pluginName}] New sensor entry input_string : {input_string}"])
mylog('verbose', [f"[{pluginName}] New sensor entry hash_value : {hash_value}"])
else:
self.isNew = False
self.isNew = plugObj == {}
# Log sensor
global plugin_objects
@@ -117,7 +124,7 @@ class sensor_config:
watched2 = sensorType,
watched3 = hash_value,
watched4 = mac,
extra = 'null',
extra = input_string,
foreignKey = deviceId
)