d1_mini_pro-sensor-mqtt/lib/HomeAssistantDevices/HALightBrightness.hpp

25 lines
607 B
C++

#pragma once
#include <HALight.hpp>
class HALightBrightnessController: public HALightController {
public:
virtual void setBrightness(int value) = 0;
virtual int getBrightness() = 0;
virtual int getBrightnessScale() = 0;
};
class HALightBrightness : public HALight {
private:
HALightBrightnessController *light;
protected:
JSON_DOCUMENT_TYPE createConfigJSON();
JSON_DOCUMENT_TYPE createStateJSON();
void innerHanlder(JSON_DOCUMENT_TYPE &doc);
public:
HALightBrightness(PubSubClient &client, const char *name, const char *unique_id,
HALightBrightnessController &baseLight);
};