ESPHome 2026.5.0b1
Loading...
Searching...
No Matches
tm1638_key.cpp
Go to the documentation of this file.
1#include "tm1638_key.h"
2
3namespace esphome::tm1638 {
4
5void TM1638Key::keys_update(uint8_t keys) {
6 bool pressed = keys & (1 << key_code_);
7 if (pressed != this->state)
8 this->publish_state(pressed);
9}
10
11} // namespace esphome::tm1638
void publish_state(bool new_state)
Publish a new state to the front-end.
bool state
The current state of this binary sensor. Also used as the backing storage for StatefulEntityBase.
void keys_update(uint8_t keys) override
Definition tm1638_key.cpp:5