mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-02-17 12:12:11 +01:00
Add invert options for commands and position #69
This commit is contained in:
parent
536bf839a1
commit
ec499cbec4
11 changed files with 138 additions and 67 deletions
4
MQTT.cpp
4
MQTT.cpp
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue