mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 11:44:13 +01:00
fe55f3a43d
Co-authored-by: Samuel Sieb <samuel@sieb.net>
13 lines
335 B
C++
13 lines
335 B
C++
#include "key_provider.h"
|
|
|
|
namespace esphome {
|
|
namespace key_provider {
|
|
|
|
void KeyProvider::add_on_key_callback(std::function<void(uint8_t)> &&callback) {
|
|
this->key_callback_.add(std::move(callback));
|
|
}
|
|
|
|
void KeyProvider::send_key_(uint8_t key) { this->key_callback_.call(key); }
|
|
|
|
} // namespace key_provider
|
|
} // namespace esphome
|