From a99d2ed24fea1377d2b07c19d537adcb9b093588 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 21 Nov 2023 22:54:29 +0100 Subject: [PATCH] Fix issue with MQTT --- library.properties | 2 +- src/jbwoprmqtt.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library.properties b/library.properties index 7febcfe..684a21b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=JBWopr -version=1.0.0-beta1 +version=1.0.0-beta2 author=Jonny Bergdahl maintainer=Jonny Bergdahl sentence=Support library for the Unexpected Maker W.O.P.R. boards diff --git a/src/jbwoprmqtt.cpp b/src/jbwoprmqtt.cpp index 394f30c..d52ab0b 100644 --- a/src/jbwoprmqtt.cpp +++ b/src/jbwoprmqtt.cpp @@ -117,7 +117,7 @@ void JBWoprMqttDevice::displayClear() { void JBWoprMqttDevice::displaySetBrightness(uint8_t val) { JBWoprWiFiDevice::displaySetBrightness(val); - mqttPublishMessage(_getTopic(ENTITY_NAME_DISPLAY, SUBENTITY_NAME_BRIGHTNESS), val); + mqttPublishMessage(_getTopic(ENTITY_NAME_DISPLAY, SUBENTITY_NAME_BRIGHTNESS), std::to_string(val)); } void JBWoprMqttDevice::displayShowText(const char* text, JBTextAlignment alignment) { @@ -186,7 +186,7 @@ void JBWoprMqttDevice::defconLedsSetBrightness(uint8_t brightness) { void JBWoprMqttDevice::defconLedSetColor(JBDefconLevel level, uint32_t color) { JBWoprWiFiDevice::defconLedSetColor(level, color); - mqttPublishMessage(_getTopic(ENTITY_NAME_DEFCON, SUBENTITY_NAME_COLOR), color); + mqttPublishMessage(_getTopic(ENTITY_NAME_DEFCON, SUBENTITY_NAME_COLOR), JBStringHelper::rgbToString(color)); } // ====================================================================