ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
template_binary_sensor.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::template_ {
8
10 public:
11 template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
12
13 void setup() override;
14 void loop() override;
15 void dump_config() override;
16
17 float get_setup_priority() const override { return setup_priority::HARDWARE; }
18
19 protected:
21};
22
23} // namespace esphome::template_
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:80