Template Text Sensor

See Application::make_template_text_sensor().

API Reference

class TemplateTextSensor : public text_sensor::TextSensor, public PollingComponent

Public Functions

TemplateTextSensor(const std::string &name, uint32_t update_interval = 15000)
void set_template(std::function<optional<std::string>()> &&f)
void update()
float get_setup_priority() const

priority of setup().

higher -> executed earlier

Defaults to 0.

Return
The setup priority of this component

Protected Attributes

std::function<optional<std::string>)> text_sensor::TemplateTextSensor::f_ = {}