18 lines
441 B
C++
18 lines
441 B
C++
#pragma once
|
|
|
|
#include <HADevice.hpp>
|
|
|
|
class HAControllableDevice : public HADevice {
|
|
protected:
|
|
char *command_topic;
|
|
unsigned int command_topic_size;
|
|
|
|
void setupCommandTopic();
|
|
|
|
public:
|
|
HAControllableDevice(PubSubClient &client, const char *device_type,
|
|
const char *name, const char *unique_id);
|
|
|
|
void subscribeToCommandTopic();
|
|
virtual void handle(char *topic, byte *payload, unsigned int length) = 0;
|
|
}; |