#pragma once #include 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; };