8static const char *
const TAG =
"template.sensor";
11 if (!this->
f_.has_value())
14 auto val = (*this->
f_)();
15 if (
val.has_value()) {
22 LOG_SENSOR(
"",
"Template Sensor",
this);
23 LOG_UPDATE_INTERVAL(
this);
void publish_state(float state)
Publish a new state to the front-end.
float get_setup_priority() const override
optional< std::function< optional< float >()> > f_
void dump_config() override
void set_template(std::function< optional< float >()> &&f)
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Providing packet encoding functions for exchanging data with a remote host.