void dump_config() override
std::string component_type() const override
bool send_initial_state() override
std::string unique_id() override
text_sensor::TextSensor * sensor_
bool publish_state(const std::string &value)
void send_discovery(JsonObject root, mqtt::SendDiscoveryConfig &config) override
MQTTTextSensor(text_sensor::TextSensor *sensor)
const EntityBase * get_entity() const override
virtual std::string unique_id()
Override this method to set the unique ID of this sensor.
void add_on_state_callback(std::function< void(std::string)> callback)