added esphome component and hmi file

This commit is contained in:
joBr99
2022-01-15 17:05:41 +01:00
parent 95f8aa1805
commit db723ea1a8
7 changed files with 513 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#pragma once
#include <utility>
#include "esphome/core/component.h"
#include "esphome/core/automation.h"
#include "nextion_custom.h"
namespace esphome {
namespace NextionCustom {
class NextionCustomMsgIncomingTrigger : public Trigger<std::string> {
public:
explicit NextionCustomMsgIncomingTrigger(NextionCustom *parent) {
parent->add_incoming_msg_callback([this](const std::string &value) { this->trigger(value); });
}
};
} // namespace NextionCustom
} // namespace esphome