Allow disable mqtt

This commit is contained in:
Jan-Jonas Sämann 2022-05-14 19:51:47 +02:00
parent 0f52c62b3f
commit 532168e1eb

View file

@ -236,7 +236,7 @@ if __name__ == '__main__':
# #
# Enables and subscribe inverter to mqtt /command-Topic # Enables and subscribe inverter to mqtt /command-Topic
# #
if inverter.get('mqtt', {}).get('send_raw_enabled', False): if mqtt_client and inverter.get('mqtt', {}).get('send_raw_enabled', False):
topic_item = ( topic_item = (
str(inverter_ser), str(inverter_ser),
inverter.get('mqtt', {}).get('topic', f'hoymiles/{inverter_ser}') + '/command' inverter.get('mqtt', {}).get('topic', f'hoymiles/{inverter_ser}') + '/command'