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

25 lines
634 B
C++
Raw Normal View History

2022-12-30 18:31:20 +03:00
#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;
2022-12-30 18:31:20 +03:00
public:
HALightBrightness(PubSubClient &client, const char *name, const char *unique_id,
HALightBrightnessController &baseLight);
};