reorganize platformio.ini configuration
This commit is contained in:
parent
8d893645fe
commit
4b498d7afd
@ -31,14 +31,18 @@ namespace Mqtt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void publishInit() {
|
void publishInit() {
|
||||||
|
#if MQTT_CLEANUP
|
||||||
Ha::publisher = publish;
|
Ha::publisher = publish;
|
||||||
Component::components.forEach([](Component* c) { c->publishConfig(); });
|
Component::components.forEach([](Component* c) { c->publishConfig(); });
|
||||||
AbstractBuilder::deleteAll();
|
AbstractBuilder::deleteAll();
|
||||||
|
#endif
|
||||||
ts.deleteTask(tPublishInit);
|
ts.deleteTask(tPublishInit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void publishCleanupConfig() {
|
void publishCleanupConfig() {
|
||||||
|
#if MQTT_CLEANUP
|
||||||
Component::components.forEach([](Component* c) { c->publishCleanupConfig(); });
|
Component::components.forEach([](Component* c) { c->publishCleanupConfig(); });
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void onMessage(char* topic, char* payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total) {
|
void onMessage(char* topic, char* payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user