From ac39d70e27676719f212e456ba68f4373887af9b Mon Sep 17 00:00:00 2001 From: Novica Tepic Date: Wed, 11 Sep 2024 08:04:43 +0200 Subject: [PATCH] Fix line break before binary operator error --- src/app.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app.py b/src/app.py index 68b5c7a..b8e9837 100644 --- a/src/app.py +++ b/src/app.py @@ -284,13 +284,11 @@ def parse_protocol_data(config, flag, protocol_data_entity, gcb_queue, client): if protocol_data_entity.mode == "OUTPUT": # Send data to cloud GcbService.push_message(gcb_queue, GCB_PROTOCOL_TOPIC, payload) - if ("engine" in protocol_data_entity.name.lower() - and "temperature" in protocol_data_entity.name.lower()) and payload["value"] > 95: - customLogger.info("Temperature of " + str(payload["value"]) - + " C is too high! Sounding the alarm!") + if ("engine temperature" in protocol_data_entity.name.lower()) and payload["value"] > 95: + customLogger.info( + "Temperature of " + str(payload["value"]) + " C is too high! Sounding the alarm!") client.publish(TEMP_ALARM_TOPIC, True, QOS) - if ("fuel" in protocol_data_entity.name.lower() - and "level" in protocol_data_entity.name.lower()) and payload["value"] < 10: + if ("fuel level" in protocol_data_entity.name.lower()) and payload["value"] < 10: customLogger.info( "Fuel level of " + str(payload["value"]) + " l is too low! Sounding the alarm!") client.publish(FUEL_ALARM_TOPIC, True, QOS)