ESPHome 2025.12.0-dev
Loading...
Searching...
No Matches
template_binary_sensor.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace template_ {
9
11 public:
12 template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
13
14 void setup() override;
15 void loop() override;
16 void dump_config() override;
17
18 float get_setup_priority() const override { return setup_priority::HARDWARE; }
19
20 protected:
22};
23
24} // namespace template_
25} // namespace esphome
Lightweight wrapper for template platform lambdas (stateless function pointers only).
void set(optional< T >(*f)(Args...))
Set the lambda function pointer.
Base class for all binary_sensor-type classes.
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Definition component.cpp:58
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7