mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-28 07:02:17 +03:00
Button added and input
This commit is contained in:
22
include/Class/Input.h
Normal file
22
include/Class/Input.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "Class/LineParsing.h"
|
||||
#include "Global.h"
|
||||
|
||||
class Input : public LineParsing {
|
||||
public:
|
||||
Input() : LineParsing(){};
|
||||
|
||||
void inputSetDefault() {
|
||||
inputSet(_key, _state);
|
||||
}
|
||||
|
||||
void inputSet(String key, String state) {
|
||||
eventGen(key, "");
|
||||
jsonWriteInt(configLiveJson, key, state.toInt());
|
||||
MqttClient::publishStatus(key, state);
|
||||
}
|
||||
};
|
||||
|
||||
extern Input* myInput;
|
||||
Reference in New Issue
Block a user