ESPHome 2025.5.0
Loading...
Searching...
No Matches
template_sensor.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome {
7namespace template_ {
8
10 public:
11 void set_template(std::function<optional<float>()> &&f);
12
13 void update() override;
14
15 void dump_config() override;
16
17 float get_setup_priority() const override;
18
19 protected:
21};
22
23} // namespace template_
24} // namespace esphome
This class simplifies creating components that periodically check a state.
Definition component.h:301
Base-class for all sensors.
Definition sensor.h:57
float get_setup_priority() const override
optional< std::function< optional< float >()> > f_
void set_template(std::function< optional< float >()> &&f)
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7