added wakeup signal after 5 seconds

Cherry picked from https://github.com/alexw23/esphome_components
Fixes #4
This commit is contained in:
Rocka84
2025-05-17 17:54:17 +02:00
parent 5533a35801
commit eb37a408ab
2 changed files with 14 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ namespace esphome {
class JiecangDeskController : public PollingComponent, public sensor::Sensor, public uart::UARTDevice {
private:
uint32_t last_message_time = 0;
float current_height = 0;
float limit_min = 0;
float limit_max = 0;
@@ -39,6 +40,7 @@ namespace esphome {
float byte2float(int high, int low);
bool bufferMessage(int data, unsigned int *buffer, int len);
void handleMessage(unsigned int *message);
void write_command(unsigned char cmd);
public:
void update() override;