2020-09-02 22:34:49 +03:00
|
|
|
#pragma once
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
#include "Class/LineParsing.h"
|
|
|
|
|
#include "Global.h"
|
|
|
|
|
|
2020-09-03 01:12:43 +03:00
|
|
|
class OutputTextClass : public LineParsing {
|
2020-09-02 22:34:49 +03:00
|
|
|
public:
|
2020-09-03 01:12:43 +03:00
|
|
|
OutputTextClass() : LineParsing(){};
|
2020-09-02 22:34:49 +03:00
|
|
|
|
|
|
|
|
void OutputModuleStateSetDefault() {
|
|
|
|
|
if (_state != "") {
|
|
|
|
|
OutputModuleChange(_key, _state);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OutputModuleChange(String key, String state) {
|
|
|
|
|
state.replace("#", " ");
|
|
|
|
|
eventGen(key, "");
|
|
|
|
|
jsonWriteStr(configLiveJson, key, state);
|
|
|
|
|
MqttClient::publishStatus(key, state);
|
|
|
|
|
}
|
|
|
|
|
};
|
2020-09-03 02:07:12 +03:00
|
|
|
extern OutputTextClass myOutputText;
|