feat(ups-hid): Beeper control

Signed-off-by: bullshit <coding@ow-software.pl>
This commit is contained in:
bullshit committed 2025-08-18 12:04:20 +02:00
1 parent 64f29e49c8
commit bbacfcb5c8
13 files changed
+702 -41

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/button/button.h"
#include "ups_hid.h"
namespace esphome {
namespace ups_hid {
class UpsHidButton : public button::Button, public Component {
public:
void set_ups_hid_parent(UpsHidComponent *parent) { parent_ = parent; }
void set_beeper_action(const std::string &action) { beeper_action_ = action; }
void dump_config() override;
protected:
void press_action() override;
UpsHidComponent *parent_{nullptr};
std::string beeper_action_{};
};
} // namespace ups_hid
} // namespace esphome