ESPHome 2025.5.0
Loading...
Searching...
No Matches
mqtt_subscribe_text_sensor.h
Go to the documentation of this file.
1#pragma once
2
4
5#ifdef USE_MQTT
6
10
11namespace esphome {
12namespace 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)
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7