2023-06-07 23:10:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../ratgdo.h"
|
|
|
|
#include "../ratgdo_state.h"
|
|
|
|
#include "esphome/components/number/number.h"
|
|
|
|
#include "esphome/core/component.h"
|
|
|
|
|
|
|
|
namespace esphome {
|
|
|
|
namespace ratgdo {
|
|
|
|
|
|
|
|
enum NumberType {
|
2023-06-25 23:03:39 +00:00
|
|
|
RATGDO_ROLLING_CODE_COUNTER,
|
|
|
|
RATGDO_OPENING_DURATION,
|
|
|
|
RATGDO_CLOSING_DURATION,
|
2023-06-07 23:10:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class RATGDONumber : public number::Number, public RATGDOClient, public Component {
|
|
|
|
public:
|
|
|
|
void dump_config() override;
|
2023-07-01 14:13:38 +00:00
|
|
|
void setup() override;
|
2023-06-25 23:03:39 +00:00
|
|
|
void set_number_type(NumberType number_type_);
|
2023-06-07 23:10:02 +00:00
|
|
|
|
2023-06-07 23:13:58 +00:00
|
|
|
void control(float value) override;
|
2023-06-07 23:10:02 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
NumberType number_type_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace ratgdo
|
|
|
|
} // namespace esphome
|