Add invert options for commands and position #69

This commit is contained in:
Robert Strouse 2023-06-16 17:42:56 -07:00
parent 536bf839a1
commit ec499cbec4
11 changed files with 138 additions and 67 deletions

View file

@ -226,6 +226,10 @@ bool MQTTClass::publish(const char *topic, uint16_t val) {
snprintf(g_content, sizeof(g_content), "%u", val);
return this->publish(topic, g_content);
}
bool MQTTClass::publish(const char *topic, bool val) {
snprintf(g_content, sizeof(g_content), "%s", val ? "true" : "false");
return this->publish(topic, g_content);
}
bool MQTTClass::connected() {
if(settings.MQTT.enabled) return mqttClient.connected();
return false;