ESPHome  2024.11.0
mqtt_subscribe_text_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "esphome/core/defines.h"
4 
5 #ifdef USE_MQTT
6 
10 
11 namespace esphome {
12 namespace mqtt_subscribe {
13 
15  public:
16  void set_parent(mqtt::MQTTClientComponent *parent) { parent_ = parent; }
17  void set_topic(const std::string &topic) { topic_ = topic; }
18  void setup() override;
19  void dump_config() override;
20  float get_setup_priority() const override;
21  void set_qos(uint8_t qos);
22 
23  protected:
25  std::string topic_;
26  uint8_t qos_{};
27 };
28 
29 } // namespace mqtt_subscribe
30 } // namespace esphome
31 
32 #endif // USE_MQTT
void set_parent(mqtt::MQTTClientComponent *parent)
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7