ESPHome 2026.6.0-dev
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
12
14 public:
15 void set_parent(mqtt::MQTTClientComponent *parent) { parent_ = parent; }
16 void set_topic(const std::string &topic) { topic_ = topic; }
17 void setup() override;
18 void dump_config() override;
19 float get_setup_priority() const override;
20 void set_qos(uint8_t qos);
21
22 protected:
24 std::string topic_;
25 uint8_t qos_{};
26};
27
28} // namespace esphome::mqtt_subscribe
29
30#endif // USE_MQTT
void set_parent(mqtt::MQTTClientComponent *parent)