From 9105e60b0f067bfe508ecf46b6d6cb42784780c2 Mon Sep 17 00:00:00 2001 From: David Baetge Date: Wed, 22 Nov 2023 01:41:44 +0100 Subject: [PATCH] Fixed MQTT tests. GH-225 --- changelog.md | 2 +- skins/weewx-wdc/src/js/live-updates.ts | 4 ++-- test/test_install_report/src/skin-mqtt.conf | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 11accd4..5f0982a 100644 --- a/changelog.md +++ b/changelog.md @@ -749,7 +749,7 @@ See https://github.com/Daveiano/weewx-wdc/compare/v3.3.0...580071ca175a03fe4924b # Next - Bugfix: Fixed "ValueError: could not convert string to float" in forecast, introduced in GH-191 -- Bugfixed Added missing `nl.conf` in `install.py` GH-221 +- Bugfix: Added missing `nl.conf` in `install.py` GH-221 - Bugfix: Fixed Gauge tiles daily reset (via MQTT) - Bugfix: Max Rain Rate Does Not Reset GH-224 - Added MQTT connection with username/password GH-225 diff --git a/skins/weewx-wdc/src/js/live-updates.ts b/skins/weewx-wdc/src/js/live-updates.ts index 8686387..c63ed32 100644 --- a/skins/weewx-wdc/src/js/live-updates.ts +++ b/skins/weewx-wdc/src/js/live-updates.ts @@ -642,6 +642,6 @@ client.connect({ onFailure: onFailure, useSSL: mqtt_ssl === "1", reconnect: true, - userName: mqtt_username && mqtt_username !== "" ? mqtt_username : undefined, - password: mqtt_password && mqtt_password !== "" ? mqtt_password : undefined, + userName: mqtt_username, + password: mqtt_password, }); diff --git a/test/test_install_report/src/skin-mqtt.conf b/test/test_install_report/src/skin-mqtt.conf index 38f269b..b48a2e7 100644 --- a/test/test_install_report/src/skin-mqtt.conf +++ b/test/test_install_report/src/skin-mqtt.conf @@ -23,6 +23,8 @@ SKIN_VERSION = 2.3.0 mqtt_websockets_port = 9001 mqtt_websockets_ssl = 0 mqtt_websockets_topic = "weather/loop" + mqtt_websockets_username = "" + mqtt_websockets_password = "" [[forecast_zambretti]] enable = False