#pragma once #include class HALightBrightnessController: public virtual HALightController { public: virtual void setBrightness(int value) = 0; virtual int getBrightness() = 0; virtual int getBrightnessScale() = 0; }; class HALightBrightness : public virtual HALight { private: HALightBrightnessController *light; protected: virtual JSON_DOCUMENT_TYPE patchConfigJSON(JSON_DOCUMENT_TYPE &doc) override; virtual JSON_DOCUMENT_TYPE patchStateJSON(JSON_DOCUMENT_TYPE &doc) override; virtual void innerHandler(const JSON_DOCUMENT_TYPE &doc) override; void handleBrightness(const JSON_DOCUMENT_TYPE &doc); public: HALightBrightness(PubSubClient &client, const char *name, const char *unique_id, HALightBrightnessController &baseLight); };