ESPHome 2025.5.0
Loading...
Searching...
No Matches
tm1638_key.cpp
Go to the documentation of this file.
1#include "tm1638_key.h"
2
3namespace esphome {
4namespace tm1638 {
5
6void TM1638Key::keys_update(uint8_t keys) {
7 bool pressed = keys & (1 << key_code_);
8 if (pressed != this->state)
9 this->publish_state(pressed);
10}
11
12} // namespace tm1638
13} // namespace esphome
bool state
The current reported state of the binary sensor.
void publish_state(bool state)
Publish a new state to the front-end.
void keys_update(uint8_t keys) override
Definition tm1638_key.cpp:6
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7