ESPHome 2025.5.0
Loading...
Searching...
No Matches
mqtt_subscribe_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
22 void set_qos(uint8_t qos);
23
24 protected:
26 std::string topic_;
27 uint8_t qos_{0};
28};
29
30} // namespace mqtt_subscribe
31} // namespace esphome
32
33#endif // USE_MQTT
void set_parent(mqtt::MQTTClientComponent *parent)
Base-class for all sensors.
Definition sensor.h:57
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7