8 static 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);
float get_setup_priority() const override
void set_template(std::function< optional< float >()> &&f)
void dump_config() override
void publish_state(float state)
Publish a new state to the front-end.
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Implementation of SPI Controller mode.
optional< std::function< optional< float >)> > f_