Battery UM fix for MQTT voltage topic.
This commit is contained in:
parent
90c965a6ba
commit
90463d8613
@ -198,7 +198,7 @@ class UsermodBattery : public Usermod
|
|||||||
// still don't know much about MQTT and/or HA
|
// still don't know much about MQTT and/or HA
|
||||||
if (WLED_MQTT_CONNECTED) {
|
if (WLED_MQTT_CONNECTED) {
|
||||||
char buf[64]; // buffer for snprintf()
|
char buf[64]; // buffer for snprintf()
|
||||||
snprintf_P(buf, 63, PSTR("/voltage%s"), mqttDeviceTopic);
|
snprintf_P(buf, 63, PSTR("%s/voltage"), mqttDeviceTopic);
|
||||||
mqtt->publish(buf, 0, false, String(voltage).c_str());
|
mqtt->publish(buf, 0, false, String(voltage).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user