mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
31 lines
714 B
C++
31 lines
714 B
C++
#pragma once
|
|
#include <Arduino.h>
|
|
#include "Class/LineParsing.h"
|
|
#include "Global.h"
|
|
|
|
class InputClass : public LineParsing {
|
|
public:
|
|
InputClass() : LineParsing(){};
|
|
|
|
void inputSetDefaultFloat() {
|
|
inputSetFloat(_key, _state);
|
|
}
|
|
|
|
void inputSetDefaultStr() {
|
|
inputSetStr(_key, _state);
|
|
}
|
|
|
|
void inputSetFloat(String key, String state) {
|
|
eventGen2(key, state);
|
|
jsonWriteFloat(configLiveJson, key, state.toFloat());
|
|
publishStatus(key, state);
|
|
}
|
|
|
|
void inputSetStr(String key, String state) {
|
|
eventGen2(key, state);
|
|
jsonWriteStr(configLiveJson, key, state);
|
|
publishStatus(key, state);
|
|
}
|
|
};
|
|
|
|
extern InputClass myInput; |