Browse Source
RPI: avoid error if mqtt is not defined
If MQTT is not defined in ahoy.yml, ahoy send an AttributeError
pull/574/head
Knuti_in_Päse
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
tools/rpi/hoymiles/__main__.py
|
|
@ -345,8 +345,8 @@ if __name__ == '__main__': |
|
|
|
if global_config.verbose: |
|
|
|
hoymiles.HOYMILES_DEBUG_LOGGING=True |
|
|
|
|
|
|
|
mqtt_config = ahoy_config.get('mqtt', []) |
|
|
|
if not mqtt_config.get('disabled', False): |
|
|
|
mqtt_config = ahoy_config.get('mqtt', {}) |
|
|
|
if mqtt_config and not mqtt_config.get('disabled', False): |
|
|
|
mqtt_client = paho.mqtt.client.Client() |
|
|
|
|
|
|
|
if mqtt_config.get('useTLS',False): |
|
|
|