ESPHome  2024.11.1
output_lock.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace output {
9 
10 class OutputLock : public lock::Lock, public Component {
11  public:
12  void set_output(BinaryOutput *output) { output_ = output; }
13 
14  float get_setup_priority() const override { return setup_priority::HARDWARE - 1.0f; }
15  void dump_config() override;
16 
17  protected:
18  void control(const lock::LockCall &call) override;
19 
21 };
22 
23 } // namespace output
24 } // namespace esphome
This class is used to encode all control actions on a lock device.
Definition: lock.h:71
void set_output(BinaryOutput *output)
Definition: output_lock.h:12
float get_setup_priority() const override
Definition: output_lock.h:14
void dump_config() override
Definition: output_lock.cpp:9
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Definition: component.cpp:18
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
output::BinaryOutput * output_
Definition: output_lock.h:20
Base class for all locks.
Definition: lock.h:103
void control(const lock::LockCall &call) override
Definition: output_lock.cpp:11