ESPHome  2022.6.2
template_binary_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace esphome {
7 namespace template_ {
8 
10  public:
11  void set_template(std::function<optional<bool>()> &&f) { this->f_ = f; }
12 
13  void loop() override;
14  void dump_config() override;
15 
16  float get_setup_priority() const override { return setup_priority::HARDWARE; }
17 
18  protected:
20 };
21 
22 } // namespace template_
23 } // namespace esphome
optional< std::function< optional< bool >)> > f_
void set_template(std::function< optional< bool >()> &&f)
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Definition: component.cpp:17
Definition: a4988.cpp:4
Base class for all binary_sensor-type classes.
Definition: binary_sensor.h:26