mirror of
https://github.com/esphome/esphome.git
synced 2025-09-12 16:22:22 +01:00
Add more demo platforms (#8903)
This commit is contained in:
18
esphome/components/demo/demo_text.h
Normal file
18
esphome/components/demo/demo_text.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "esphome/components/text/text.h"
|
||||
#include "esphome/core/component.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace demo {
|
||||
|
||||
class DemoText : public text::Text, public Component {
|
||||
public:
|
||||
void setup() override { this->publish_state("I am a text entity"); }
|
||||
|
||||
protected:
|
||||
void control(const std::string &value) override { this->publish_state(value); }
|
||||
};
|
||||
|
||||
} // namespace demo
|
||||
} // namespace esphome
|
Reference in New Issue
Block a user