21 lines
474 B
C++
21 lines
474 B
C++
#pragma once
|
|
|
|
#include <HAControllableDevice.hpp>
|
|
|
|
class HALightController {
|
|
public:
|
|
virtual void setState(bool state) = 0;
|
|
virtual bool getState() = 0;
|
|
};
|
|
|
|
class HALight : public HAControllableDevice {
|
|
private:
|
|
HALightController *light;
|
|
|
|
public:
|
|
HALight(PubSubClient &client, const char *name, const char *unique_id,
|
|
HALightController &baseLight);
|
|
void handle(char *topic, byte *payload, unsigned int length);
|
|
void sendConfig();
|
|
void sendState();
|
|
}; |