Source code for safecor._mqtt_helper

""" \author Tristan Israël """

[docs] class MqttHelper(): """ This class contains helper functions for the MQTT facility """
[docs] @staticmethod def check_payload(payload:dict, expected_keys:list): """ Verifies that the payload contains some necessary keys """ for key in expected_keys: if payload.get(key) is None: return False return True