mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 03:34:18 +01:00
f0b183a552
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: William Charlton <will.charlton1@icloud.com>
27 lines
533 B
C++
27 lines
533 B
C++
#pragma once
|
|
|
|
#ifdef USE_ARDUINO
|
|
|
|
#include "esphome/components/button/button.h"
|
|
#include "esphome/core/component.h"
|
|
#include "WiFiUdp.h"
|
|
|
|
namespace esphome {
|
|
namespace wake_on_lan {
|
|
|
|
class WakeOnLanButton : public button::Button, public Component {
|
|
public:
|
|
void set_macaddr(uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t e, uint8_t f);
|
|
|
|
void dump_config() override;
|
|
|
|
protected:
|
|
WiFiUDP udp_client_{};
|
|
void press_action() override;
|
|
uint8_t macaddr_[6];
|
|
};
|
|
|
|
} // namespace wake_on_lan
|
|
} // namespace esphome
|
|
|
|
#endif
|