fixed input publish and change climate to name
This commit is contained in:
parent
4c77474a94
commit
e1f0fd5651
6 changed files with 55 additions and 14 deletions
|
@ -7,6 +7,7 @@ void IoTComponent::setMqttClient(PubSubClient *mqtt) {
|
|||
void IoTComponent::publishRelative(const char *topic, const char *payload) {
|
||||
static char absolute_topic[100];
|
||||
sprintf(absolute_topic, "%s/%02d/%s", base_topic, card_id, topic);
|
||||
ESP_LOGD("IoTComponent", "Publishing to %s : %s", absolute_topic, payload);
|
||||
mqtt->publish(absolute_topic, payload);
|
||||
mqtt->loop();
|
||||
delay(50);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue