MQTT Subscribe Text Sensor

See Application::make_mqtt_subscribe_text_sensor().

API Reference

class MQTTSubscribeTextSensor : public text_sensor::TextSensor, public Component

Public Functions

MQTTSubscribeTextSensor(const std::string &name, std::string topic)
void setup()

Where the component’s initialization should happen.

Analogous to Arduino’s setup(). This method is guaranteed to only be called once. Defaults to doing nothing.

void dump_config()
float get_setup_priority() const

priority of setup().

higher -> executed earlier

Defaults to 0.

The setup priority of this component

void set_qos(uint8_t qos)

Protected Attributes

std::string topic_
uint8_t qos_ = {0}