25 lines
634 B
C++
25 lines
634 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() override;
|
|
JSON_DOCUMENT_TYPE createStateJSON() override;
|
|
void innerHanlder(JSON_DOCUMENT_TYPE &doc) override;
|
|
public:
|
|
HALightBrightness(PubSubClient &client, const char *name, const char *unique_id,
|
|
HALightBrightnessController &baseLight);
|
|
}; |